#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fn_add()
{
    sm2_fn_t    augend, addend, sum;
    std::uint8_t sum_data[32];

    static std::uint8_t augend0[32] = {0x6a,0x08,0xaa,0x79,0x6a,0x8a,0xd5,0x11,0x4c,0xa2,0xac,0x51,0xe8,0xf8,0x1f,0x42,0x9c,0x69,0x38,0x69,0xab,0x71,0x24,0x91,0xe6,0x48,0x5e,0xcd,0x2c,0x14,0xd8,0x10};
    static std::uint8_t addend0[32] = {0x2a,0x9b,0x4f,0xfe,0xae,0x00,0xf9,0xc7,0x2a,0x71,0xaa,0x4a,0x47,0x62,0x10,0x08,0xc8,0x2c,0xa6,0x2d,0x07,0x53,0xcb,0x4e,0x90,0x5a,0xe3,0xa7,0x59,0xdd,0x20,0x9f};
    static std::uint8_t sum0[32]    = {0x94,0xa3,0xfa,0x78,0x18,0x8b,0xce,0xd8,0x77,0x14,0x56,0x9c,0x30,0x5a,0x2f,0x4b,0x64,0x95,0xde,0x96,0xb2,0xc4,0xef,0xe0,0x76,0xa3,0x42,0x74,0x85,0xf1,0xf8,0xaf};
    sm2_fn_from_bytes(augend, augend0);
    sm2_fn_from_bytes(addend, addend0);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum0, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend1[32] = {0x06,0x23,0x5d,0x9e,0x3f,0x6a,0x14,0xf7,0x85,0xe4,0x59,0x95,0x2d,0xa8,0xe8,0x49,0x49,0x7c,0x0b,0xc2,0xb7,0x39,0x98,0x59,0x4e,0x30,0x97,0x54,0xa9,0x33,0x17,0x18};
    static std::uint8_t addend1[32] = {0x1f,0xb4,0xb6,0x38,0x33,0x79,0x48,0x62,0x2f,0x02,0xc1,0xb2,0x32,0x53,0x61,0x54,0x55,0xeb,0x2e,0x87,0x2d,0xb3,0xaa,0x79,0x28,0x40,0x63,0x0e,0x4b,0x3b,0x8c,0x78};
    static std::uint8_t sum1[32]    = {0x25,0xd8,0x13,0xd6,0x72,0xe3,0x5d,0x59,0xb4,0xe7,0x1b,0x47,0x5f,0xfc,0x49,0x9d,0x9f,0x67,0x3a,0x49,0xe4,0xed,0x42,0xd2,0x76,0x70,0xfa,0x62,0xf4,0x6e,0xa3,0x90};
    sm2_fn_from_bytes(augend, augend1);
    sm2_fn_from_bytes(addend, addend1);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum1, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend2[32] = {0x80,0xa6,0xf6,0x40,0xfe,0xb5,0x38,0xef,0xd8,0xd6,0xa4,0x96,0xd4,0x19,0xfb,0x5b,0x46,0x9e,0x91,0x7c,0xae,0x69,0x45,0x0e,0xa0,0xa5,0x87,0xbf,0xe1,0xd4,0xd1,0xa9};
    static std::uint8_t addend2[32] = {0x79,0x2f,0x36,0xf4,0xe0,0x96,0x1e,0x54,0x8f,0x80,0xe2,0x96,0xd0,0x07,0xf6,0xf2,0x13,0x57,0xa0,0xee,0x02,0xd9,0x11,0xa1,0x8f,0x7c,0xf8,0x13,0xe2,0x1f,0x80,0x52};
    static std::uint8_t sum2[32]    = {0xf9,0xd6,0x2d,0x35,0xdf,0x4b,0x57,0x44,0x68,0x57,0x87,0x2d,0xa4,0x21,0xf2,0x4d,0x59,0xf6,0x32,0x6a,0xb1,0x42,0x56,0xb0,0x30,0x22,0x7f,0xd3,0xc3,0xf4,0x51,0xfb};
    sm2_fn_from_bytes(augend, augend2);
    sm2_fn_from_bytes(addend, addend2);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum2, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend3[32] = {0x24,0x59,0x44,0xa7,0xbe,0x89,0x82,0x31,0x0c,0x98,0x44,0x33,0x1a,0x06,0x87,0x6e,0xa6,0x48,0x7b,0x36,0x07,0xb6,0x0a,0x93,0x0c,0xd5,0x92,0x7f,0xb3,0x15,0x91,0xa6};
    static std::uint8_t addend3[32] = {0x13,0x9b,0x3e,0xe8,0xcc,0x32,0xb5,0xa2,0xbf,0x55,0x60,0x02,0xca,0xd7,0x63,0x20,0xb2,0x15,0xd5,0x89,0x34,0x81,0x46,0xa1,0xbb,0xe4,0xe3,0x7a,0xce,0x8f,0x02,0x60};
    static std::uint8_t sum3[32]    = {0x37,0xf4,0x83,0x90,0x8a,0xbc,0x37,0xd3,0xcb,0xed,0xa4,0x35,0xe4,0xdd,0xea,0x8f,0x58,0x5e,0x50,0xbf,0x3c,0x37,0x51,0x34,0xc8,0xba,0x75,0xfa,0x81,0xa4,0x94,0x06};
    sm2_fn_from_bytes(augend, augend3);
    sm2_fn_from_bytes(addend, addend3);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum3, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend4[32] = {0xd0,0x8d,0x78,0x22,0xd7,0xbf,0xf8,0x67,0x3b,0x50,0x24,0x2f,0x42,0xdf,0xb3,0xa5,0x4f,0x54,0xdf,0x1c,0xfc,0xc2,0xfc,0x2b,0x89,0x38,0xb5,0xa5,0xf7,0x74,0xdb,0x08};
    static std::uint8_t addend4[32] = {0x28,0x6c,0x3e,0xcf,0xfb,0xb5,0x3a,0x03,0x82,0x09,0xc1,0xfa,0xff,0x50,0xeb,0xd5,0xf0,0x59,0xa9,0x63,0x7a,0x74,0xe0,0x65,0x3b,0xae,0x54,0x33,0xa5,0x28,0xc7,0x02};
    static std::uint8_t sum4[32]    = {0xf8,0xf9,0xb6,0xf2,0xd3,0x75,0x32,0x6a,0xbd,0x59,0xe6,0x2a,0x42,0x30,0x9f,0x7b,0x3f,0xae,0x88,0x80,0x77,0x37,0xdc,0x90,0xc4,0xe7,0x09,0xd9,0x9c,0x9d,0xa2,0x0a};
    sm2_fn_from_bytes(augend, augend4);
    sm2_fn_from_bytes(addend, addend4);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum4, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend5[32] = {0x2f,0x69,0xd1,0x92,0xa8,0x26,0x72,0x70,0x72,0x62,0x13,0xe6,0xc6,0xc7,0x67,0x66,0x42,0xca,0x37,0x4f,0xb9,0x78,0xd1,0xbb,0x70,0x0c,0x7c,0x00,0x55,0x53,0x21,0xaf};
    static std::uint8_t addend5[32] = {0x79,0x42,0xf5,0x36,0xec,0x7c,0xfe,0x93,0x24,0x2c,0x42,0x64,0x6e,0x87,0xcb,0x54,0x80,0x26,0x51,0x11,0x6d,0xad,0xba,0x39,0xb9,0x60,0x5d,0x77,0xaf,0xe0,0x36,0x28};
    static std::uint8_t sum5[32]    = {0xa8,0xac,0xc6,0xc9,0x94,0xa3,0x71,0x03,0x96,0x8e,0x56,0x4b,0x35,0x4f,0x32,0xba,0xc2,0xf0,0x88,0x61,0x27,0x26,0x8b,0xf5,0x29,0x6c,0xd9,0x78,0x05,0x33,0x57,0xd7};
    sm2_fn_from_bytes(augend, augend5);
    sm2_fn_from_bytes(addend, addend5);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum5, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend6[32] = {0xda,0x3e,0xab,0xe4,0x34,0xd6,0xa8,0x76,0x4f,0x9f,0x16,0xc3,0x56,0x3b,0x8a,0x52,0xa9,0x4b,0xf2,0x8b,0x35,0x2e,0x3c,0x22,0x22,0xb7,0x2b,0x94,0xf4,0x19,0x88,0xf1};
    static std::uint8_t addend6[32] = {0x29,0x7f,0x6f,0xbf,0x1a,0x5c,0x9f,0xa8,0x96,0xf4,0x28,0xd8,0x36,0x13,0x47,0x75,0x1e,0x7b,0x3f,0xad,0xe9,0xcb,0xfa,0x1b,0x37,0x1a,0x27,0x9a,0xc6,0x19,0x13,0x2f};
    static std::uint8_t sum6[32]    = {0x03,0xbe,0x1b,0xa4,0x4f,0x33,0x48,0x1e,0xe6,0x93,0x3f,0x9b,0x8c,0x4e,0xd1,0xc8,0x55,0xc3,0x52,0xcd,0xfd,0x34,0x31,0x12,0x06,0x15,0x5f,0x26,0x80,0x5d,0x5a,0xfd};
    sm2_fn_from_bytes(augend, augend6);
    sm2_fn_from_bytes(addend, addend6);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum6, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend7[32] = {0x5c,0x52,0xa9,0xd2,0xa9,0xad,0x4e,0x8c,0x5b,0xeb,0xfc,0xd3,0x17,0xcf,0x7b,0x24,0xce,0x06,0xf0,0x1e,0xa1,0xd5,0x3b,0xbc,0x91,0xe8,0xda,0xc0,0xc5,0xb0,0x75,0xf1};
    static std::uint8_t addend7[32] = {0x4e,0xbb,0x64,0x25,0x2c,0x85,0xcb,0xd2,0xf6,0xa9,0xd4,0xbf,0xfc,0x23,0xc8,0x0f,0xc0,0x1d,0x19,0xf4,0x96,0x4c,0xf3,0x85,0x31,0xd9,0xc7,0x49,0x6a,0x72,0x0d,0x98};
    static std::uint8_t sum7[32]    = {0xab,0x0e,0x0d,0xf7,0xd6,0x33,0x1a,0x5f,0x52,0x95,0xd1,0x93,0x13,0xf3,0x43,0x34,0x8e,0x24,0x0a,0x13,0x38,0x22,0x2f,0x41,0xc3,0xc2,0xa2,0x0a,0x30,0x22,0x83,0x89};
    sm2_fn_from_bytes(augend, augend7);
    sm2_fn_from_bytes(addend, addend7);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum7, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend8[32] = {0x85,0x23,0xd6,0x2a,0xe2,0xf1,0x86,0xf5,0x33,0xe5,0x3b,0x8e,0x3e,0xc2,0xcf,0x02,0x74,0x98,0xcc,0x98,0x2e,0x10,0x4a,0x71,0x51,0x5e,0x06,0x30,0x6d,0x61,0x3c,0xe8};
    static std::uint8_t addend8[32] = {0x02,0x03,0x15,0xe2,0x20,0xe0,0x97,0xf4,0xd9,0x17,0xc0,0xe6,0x0e,0x4d,0x1c,0x9c,0xb9,0xa1,0x45,0x7a,0x2f,0x9d,0x98,0x21,0x98,0xf8,0x6b,0x00,0x6b,0xae,0x8c,0x04};
    static std::uint8_t sum8[32]    = {0x87,0x26,0xec,0x0d,0x03,0xd2,0x1e,0xea,0x0c,0xfc,0xfc,0x74,0x4d,0x0f,0xeb,0x9f,0x2e,0x3a,0x12,0x12,0x5d,0xad,0xe2,0x92,0xea,0x56,0x71,0x30,0xd9,0x0f,0xc8,0xec};
    sm2_fn_from_bytes(augend, augend8);
    sm2_fn_from_bytes(addend, addend8);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum8, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend9[32] = {0xc8,0x4b,0x01,0xb9,0x58,0x28,0x6a,0x89,0x72,0x2a,0x2d,0x46,0x16,0x4b,0x84,0xf7,0x49,0x74,0x24,0x04,0xb6,0x1c,0xf3,0x62,0x2e,0xbb,0x7e,0x80,0x5e,0xaa,0x23,0x46};
    static std::uint8_t addend9[32] = {0x37,0xe4,0x0d,0x09,0x53,0x4d,0xae,0x17,0x43,0xc2,0x60,0x76,0x4d,0xdc,0xd5,0x5c,0xaa,0x95,0xc6,0x03,0xdd,0xbf,0x3f,0x6c,0x47,0xe5,0xa2,0x12,0xaa,0xd0,0x88,0xce};
    static std::uint8_t sum9[32]    = {0x00,0x2f,0x0e,0xc3,0xab,0x76,0x18,0xa0,0xb5,0xec,0x8d,0xbc,0x64,0x28,0x5a,0x54,0x82,0x06,0x0a,0x9d,0x72,0x16,0x2d,0xa3,0x22,0xe5,0x2c,0x89,0xcf,0xa5,0x6a,0xf1};
    sm2_fn_from_bytes(augend, augend9);
    sm2_fn_from_bytes(addend, addend9);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum9, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend10[32] = {0x3f,0x02,0xb4,0xe3,0xcd,0xc8,0xb5,0x6a,0x01,0x3a,0x72,0x35,0x9a,0x01,0x44,0x43,0x67,0x03,0x82,0x78,0xbd,0xf1,0x85,0x1a,0xc5,0x5e,0x81,0x5c,0xbd,0x90,0x7b,0x42};
    static std::uint8_t addend10[32] = {0x3d,0x04,0xb8,0x2b,0x3f,0x2a,0x12,0xb8,0x0f,0x0c,0x1a,0xb0,0x79,0xc2,0x66,0x04,0xe4,0x1d,0xbf,0x0b,0x6d,0x9a,0xbf,0xa6,0x21,0x85,0x2e,0x32,0xf4,0xbe,0x3a,0x42};
    static std::uint8_t sum10[32]    = {0x7c,0x07,0x6d,0x0f,0x0c,0xf2,0xc8,0x22,0x10,0x46,0x8c,0xe6,0x13,0xc3,0xaa,0x48,0x4b,0x21,0x41,0x84,0x2b,0x8c,0x44,0xc0,0xe6,0xe3,0xaf,0x8f,0xb2,0x4e,0xb5,0x84};
    sm2_fn_from_bytes(augend, augend10);
    sm2_fn_from_bytes(addend, addend10);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum10, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend11[32] = {0xf9,0x8e,0x76,0x20,0xad,0x28,0xea,0xb6,0xb8,0x2e,0xd4,0xa9,0x8d,0x9e,0x5d,0xfd,0x65,0x68,0x7f,0x6f,0x4d,0x23,0x1e,0xd2,0x8b,0xd5,0x87,0x54,0x99,0xe6,0x8a,0xef};
    static std::uint8_t addend11[32] = {0x86,0xa6,0x09,0x66,0x28,0x2a,0x27,0xf3,0xaa,0xf1,0xe9,0xf2,0xeb,0xb4,0xcd,0x60,0x9d,0xe1,0xf9,0xac,0x46,0x2d,0x99,0x16,0x61,0x5a,0xb7,0xa0,0xc7,0x0e,0x11,0xda};
    static std::uint8_t sum11[32]    = {0x80,0x34,0x7f,0x87,0xd5,0x53,0x12,0xaa,0x63,0x20,0xbe,0x9c,0x79,0x53,0x2b,0x5e,0x91,0x46,0x99,0xb0,0x71,0x8a,0xb2,0xbd,0x99,0x74,0x4a,0xec,0x27,0x1f,0x5b,0xa6};
    sm2_fn_from_bytes(augend, augend11);
    sm2_fn_from_bytes(addend, addend11);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum11, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend12[32] = {0xa6,0x4b,0xcf,0x8e,0x31,0x2a,0x8d,0x57,0x4d,0xc1,0x54,0xc3,0x1e,0x66,0x15,0x00,0xeb,0x2d,0xe4,0x49,0x9c,0x5b,0x5a,0x60,0xfd,0x98,0x40,0xf8,0x1c,0x1a,0x2a,0x9d};
    static std::uint8_t addend12[32] = {0xe0,0xf4,0xa9,0x85,0x67,0xac,0xf0,0x58,0x01,0xd6,0x03,0xef,0x12,0xcd,0x26,0x7d,0xad,0xd6,0x93,0x78,0xf7,0xd5,0x0b,0x3a,0xc9,0x74,0x8e,0xf5,0xa1,0x14,0xcf,0x13};
    static std::uint8_t sum12[32]    = {0x87,0x40,0x79,0x14,0x98,0xd7,0x7d,0xaf,0x4f,0x97,0x58,0xb2,0x31,0x33,0x3b,0x7f,0x27,0x00,0x98,0x57,0x72,0x6a,0x60,0x70,0x73,0x50,0xdb,0xe4,0x83,0x59,0xb8,0x8d};
    sm2_fn_from_bytes(augend, augend12);
    sm2_fn_from_bytes(addend, addend12);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum12, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend13[32] = {0xde,0x36,0x80,0xe3,0x43,0x60,0xb9,0x38,0x6b,0xa0,0xad,0xaa,0xe7,0xe8,0xf7,0x54,0xf1,0xa9,0xf1,0xe1,0xe2,0xbe,0xeb,0x24,0x21,0xe1,0x8e,0x8a,0xb3,0x87,0x63,0xd2};
    static std::uint8_t addend13[32] = {0x2c,0x88,0x1c,0xae,0x5f,0xc1,0xe3,0x9c,0xb6,0x85,0x48,0x0f,0x7f,0x2e,0x24,0x58,0xf0,0xdc,0xab,0xbf,0x2e,0x9d,0x2d,0xd8,0xbb,0xc8,0xe8,0xb3,0x90,0x64,0x4c,0x1b};
    static std::uint8_t sum13[32]    = {0x0a,0xbe,0x9d,0x92,0xa3,0x22,0x9c,0xd5,0x22,0x25,0xf5,0xba,0x67,0x17,0x1b,0xae,0x70,0x82,0xbe,0x35,0xef,0x96,0x13,0xd1,0x89,0xee,0x83,0x35,0x0a,0x16,0x6e,0xca};
    sm2_fn_from_bytes(augend, augend13);
    sm2_fn_from_bytes(addend, addend13);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum13, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend14[32] = {0x6c,0x45,0x1b,0xea,0x94,0x83,0x7d,0x5e,0xbd,0xb3,0x88,0xff,0xab,0x27,0x23,0xaa,0xfd,0xba,0x26,0xa8,0x80,0x7d,0x70,0xec,0xa9,0x8c,0x87,0xf0,0x99,0x0f,0x16,0x3e};
    static std::uint8_t addend14[32] = {0x0f,0xe7,0x6d,0x13,0x85,0x18,0x0d,0x30,0xa4,0xf4,0xde,0x6e,0x33,0xa6,0x57,0xc3,0x1a,0xcd,0x43,0xdc,0x6e,0x74,0x6a,0xd7,0xc9,0x5d,0x36,0xcb,0x00,0xdb,0x56,0xeb};
    static std::uint8_t sum14[32]    = {0x7c,0x2c,0x88,0xfe,0x19,0x9b,0x8a,0x8f,0x62,0xa8,0x67,0x6d,0xde,0xcd,0x7b,0x6e,0x18,0x87,0x6a,0x84,0xee,0xf1,0xdb,0xc4,0x72,0xe9,0xbe,0xbb,0x99,0xea,0x6d,0x29};
    sm2_fn_from_bytes(augend, augend14);
    sm2_fn_from_bytes(addend, addend14);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum14, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend15[32] = {0x10,0x1a,0x84,0x92,0xf7,0x53,0x93,0xf3,0x35,0x12,0x6d,0x20,0xd1,0x16,0x9d,0x7b,0xd4,0x0e,0xea,0x57,0xbb,0xff,0x8b,0xf4,0xe4,0xac,0x7f,0xc1,0xa8,0xa5,0x31,0x4e};
    static std::uint8_t addend15[32] = {0x3a,0x0d,0xcd,0x07,0x2f,0x0e,0xd8,0xbb,0x09,0xbf,0xce,0x50,0x0e,0x9c,0x85,0x34,0xc3,0xee,0x18,0xca,0x94,0x12,0x8d,0x70,0x48,0xa1,0x69,0xc2,0x64,0x51,0xe9,0x48};
    static std::uint8_t sum15[32]    = {0x4a,0x28,0x51,0x9a,0x26,0x62,0x6c,0xae,0x3e,0xd2,0x3b,0x70,0xdf,0xb3,0x22,0xb0,0x97,0xfd,0x03,0x22,0x50,0x12,0x19,0x65,0x2d,0x4d,0xe9,0x84,0x0c,0xf7,0x1a,0x96};
    sm2_fn_from_bytes(augend, augend15);
    sm2_fn_from_bytes(addend, addend15);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum15, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend16[32] = {0xcc,0x8e,0xf4,0x6b,0x06,0x21,0x2d,0x04,0xeb,0x23,0xc4,0x2e,0xe1,0xbe,0xb4,0xba,0xf2,0x8b,0x9a,0xfb,0xef,0x6c,0xe1,0x3b,0xec,0x3d,0xb6,0x61,0x74,0xc5,0x83,0xd6};
    static std::uint8_t addend16[32] = {0x92,0xe3,0x1e,0xfa,0xb7,0x09,0x9c,0xb5,0x90,0x86,0x11,0x95,0x96,0x00,0xb8,0xeb,0x22,0x8f,0x68,0x44,0x8c,0x1e,0x34,0xd1,0x8b,0xe9,0x66,0xaa,0x08,0xc4,0xc6,0xe4};
    static std::uint8_t sum16[32]    = {0x5f,0x72,0x13,0x66,0xbd,0x2a,0xc9,0xba,0x7b,0xa9,0xd5,0xc4,0x77,0xbf,0x6d,0xa6,0xa3,0x17,0x23,0xd5,0x59,0xc5,0x10,0xe2,0x24,0x6b,0x29,0x02,0x43,0xb5,0x09,0x97};
    sm2_fn_from_bytes(augend, augend16);
    sm2_fn_from_bytes(addend, addend16);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum16, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend17[32] = {0x5b,0x4a,0xe3,0xfb,0x7c,0xcc,0x7a,0x2e,0x95,0x4a,0x32,0x31,0x47,0x3a,0xd8,0x98,0xa8,0xbc,0x7c,0x52,0xc7,0x85,0xf1,0x47,0x58,0x6e,0xc1,0x60,0xf8,0xa1,0x9f,0x5b};
    static std::uint8_t addend17[32] = {0xfe,0xc5,0x8f,0xee,0x64,0x95,0x1b,0x03,0xc2,0x84,0xa3,0x27,0x50,0xa4,0x24,0x5c,0x37,0x76,0x33,0x08,0xae,0x45,0xc8,0x2e,0x2e,0x96,0x2b,0xd7,0x1b,0x84,0xf2,0x1c};
    static std::uint8_t sum17[32]    = {0x5a,0x10,0x73,0xea,0xe1,0x61,0x95,0x32,0x57,0xce,0xd5,0x58,0x97,0xde,0xfc,0xf5,0x6e,0x2e,0xcf,0xf0,0x54,0x05,0xb4,0x4a,0x33,0x48,0xf9,0x2e,0xda,0x51,0x50,0x54};
    sm2_fn_from_bytes(augend, augend17);
    sm2_fn_from_bytes(addend, addend17);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum17, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend18[32] = {0x0d,0x5b,0x12,0x22,0xc1,0xaa,0x4d,0xc3,0xf6,0x35,0x22,0x38,0x1a,0x8e,0x06,0x18,0xef,0x35,0xdf,0x26,0x89,0x5b,0x50,0x87,0xd7,0x88,0x5f,0xd1,0x64,0x00,0xde,0xa0};
    static std::uint8_t addend18[32] = {0xdb,0xb3,0x6f,0x05,0x9a,0x9f,0xf2,0xda,0xa8,0xf0,0x29,0xac,0x85,0x46,0x41,0x93,0x6d,0x2a,0xb9,0xfa,0x9a,0x79,0x59,0x45,0xfa,0xaa,0x7e,0xbe,0x07,0x37,0x0c,0xde};
    static std::uint8_t sum18[32]    = {0xe9,0x0e,0x81,0x28,0x5c,0x4a,0x40,0x9e,0x9f,0x25,0x4b,0xe4,0x9f,0xd4,0x47,0xac,0x5c,0x60,0x99,0x21,0x23,0xd4,0xa9,0xcd,0xd2,0x32,0xde,0x8f,0x6b,0x37,0xeb,0x7e};
    sm2_fn_from_bytes(augend, augend18);
    sm2_fn_from_bytes(addend, addend18);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum18, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend19[32] = {0x48,0x6d,0x1e,0xe5,0x22,0x13,0x7c,0x3f,0xd0,0x76,0xff,0xae,0x60,0xce,0x95,0x83,0xfe,0x86,0x8e,0xda,0xb3,0xd2,0xe5,0x3d,0xfa,0x11,0x17,0xba,0x4d,0x13,0x52,0x47};
    static std::uint8_t addend19[32] = {0xc7,0xed,0xf2,0x27,0x78,0x79,0x3c,0xc9,0x74,0x73,0xd0,0x77,0x38,0x31,0x5d,0x0b,0xac,0xba,0xaa,0xf5,0xc5,0xf5,0xfb,0x50,0x48,0xb0,0x27,0x2b,0x9b,0xd3,0x07,0x57};
    static std::uint8_t sum19[32]    = {0x10,0x5b,0x11,0x0d,0x9a,0x8c,0xb9,0x09,0x44,0xea,0xd0,0x25,0x98,0xff,0xf2,0x90,0x39,0x3d,0x5a,0x65,0x58,0x02,0xdb,0x62,0xef,0x05,0x4a,0xdc,0xaf,0x11,0x18,0x7b};
    sm2_fn_from_bytes(augend, augend19);
    sm2_fn_from_bytes(addend, addend19);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum19, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend20[32] = {0x77,0xba,0x42,0x2f,0xeb,0x8a,0xd5,0xc9,0x70,0x69,0x0d,0x2e,0x09,0x92,0x12,0xd4,0x01,0xa0,0x9c,0xed,0xc6,0xa7,0xfc,0xda,0xf9,0x78,0xc1,0xb5,0xb4,0xc4,0xfe,0x47};
    static std::uint8_t addend20[32] = {0x06,0xe6,0x66,0xc4,0x33,0xc3,0x0e,0x46,0x76,0x30,0x99,0x89,0x03,0x6f,0x4c,0x5b,0xa7,0x72,0x0c,0x0b,0xf8,0x06,0x6f,0xd1,0x2f,0xad,0x59,0x01,0xaf,0xfb,0xd5,0x76};
    static std::uint8_t sum20[32]    = {0x7e,0xa0,0xa8,0xf4,0x1f,0x4d,0xe4,0x0f,0xe6,0x99,0xa6,0xb7,0x0d,0x01,0x5f,0x2f,0xa9,0x12,0xa8,0xf9,0xbe,0xae,0x6c,0xac,0x29,0x26,0x1a,0xb7,0x64,0xc0,0xd3,0xbd};
    sm2_fn_from_bytes(augend, augend20);
    sm2_fn_from_bytes(addend, addend20);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum20, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend21[32] = {0x98,0x8d,0x92,0xbd,0x3e,0x68,0x7d,0x79,0xd4,0xd0,0x58,0x63,0x8c,0xc1,0xfb,0x4f,0xc6,0x70,0x79,0x04,0x2b,0x88,0x40,0xb6,0x4b,0xf4,0xd2,0x4f,0x56,0x57,0x0f,0xb3};
    static std::uint8_t addend21[32] = {0xc5,0xa6,0x26,0xb2,0xe4,0xb2,0xf1,0xb4,0x52,0x71,0x35,0xa0,0x4b,0x13,0xe4,0x29,0xa3,0xf5,0xce,0x3f,0xc6,0x3c,0x94,0x4c,0x70,0xaa,0x94,0xac,0x78,0xb6,0x6c,0xf7};
    static std::uint8_t sum21[32]    = {0x5e,0x33,0xb9,0x71,0x23,0x1b,0x6f,0x2e,0x27,0x41,0x8e,0x03,0xd7,0xd5,0xdf,0x79,0xf8,0x62,0x67,0xd8,0xcf,0xfe,0xcf,0xd7,0x68,0xe3,0x72,0xf2,0x95,0x38,0x3b,0x87};
    sm2_fn_from_bytes(augend, augend21);
    sm2_fn_from_bytes(addend, addend21);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum21, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend22[32] = {0xfc,0x2b,0x41,0xa5,0x47,0xd6,0x30,0x0b,0x6b,0xaa,0x80,0xb7,0x3e,0x5a,0xd2,0xbe,0x10,0xa3,0x96,0xc5,0x1e,0x7e,0x75,0x0f,0x9c,0xa8,0x88,0xff,0xb2,0x7e,0x2a,0x36};
    static std::uint8_t addend22[32] = {0x26,0x32,0x65,0xab,0xb8,0x86,0x93,0x4b,0x8d,0xa4,0xcd,0xb7,0x46,0x52,0xd1,0x91,0x45,0x31,0x77,0xcd,0xb6,0xa5,0xd1,0x88,0xd7,0xaa,0xe4,0x0e,0xdb,0x1f,0x1f,0xdb};
    static std::uint8_t sum22[32]    = {0x22,0x5d,0xa7,0x52,0x00,0x5c,0xc3,0x56,0xf9,0x4f,0x4e,0x6e,0x84,0xad,0xa4,0x4f,0xe3,0xd1,0x2f,0x27,0xb3,0x5e,0x41,0x6d,0x20,0x97,0x79,0x05,0x53,0xc8,0x08,0xee};
    sm2_fn_from_bytes(augend, augend22);
    sm2_fn_from_bytes(addend, addend22);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum22, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend23[32] = {0x8b,0x43,0xa2,0x3e,0x5e,0x6b,0x4d,0x9e,0xa1,0x58,0x4e,0x32,0x23,0xc7,0xde,0xd3,0xfc,0x95,0x51,0x0f,0xd9,0x57,0x90,0x26,0x70,0x18,0x12,0x45,0x19,0x0e,0xae,0x58};
    static std::uint8_t addend23[32] = {0x48,0x89,0x83,0x52,0xa9,0x8d,0xa7,0xf1,0xca,0x3a,0xfa,0xb4,0x2d,0x8e,0xec,0x14,0xa1,0xc2,0xc0,0x16,0x38,0x28,0x33,0x3c,0x79,0x90,0x31,0x11,0xef,0x09,0xac,0x88};
    static std::uint8_t sum23[32]    = {0xd3,0xcd,0x25,0x91,0x07,0xf8,0xf5,0x90,0x6b,0x93,0x48,0xe6,0x51,0x56,0xca,0xe8,0x9e,0x58,0x11,0x26,0x11,0x7f,0xc3,0x62,0xe9,0xa8,0x43,0x57,0x08,0x18,0x5a,0xe0};
    sm2_fn_from_bytes(augend, augend23);
    sm2_fn_from_bytes(addend, addend23);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum23, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend24[32] = {0xb3,0xc3,0x69,0x7a,0xde,0x8f,0x5c,0xfa,0x13,0x62,0x7b,0xc4,0xa2,0xfc,0x7c,0xdc,0x4e,0x59,0xbc,0x2d,0xf3,0xda,0xa8,0xa2,0x18,0x21,0x8e,0xc2,0xdf,0x2f,0xe6,0xbd};
    static std::uint8_t addend24[32] = {0x67,0xa1,0xd5,0x3e,0xb2,0x2b,0x75,0x79,0x37,0xd6,0xab,0x99,0x75,0x01,0x5d,0xf9,0x2a,0xa2,0x46,0xdc,0x03,0xe6,0x16,0xda,0x03,0xdf,0xfb,0x8a,0xd6,0xd5,0xd9,0xe5};
    static std::uint8_t sum24[32]    = {0x1b,0x65,0x3e,0xba,0x90,0xba,0xd2,0x73,0x4b,0x39,0x27,0x5e,0x17,0xfd,0xda,0xd6,0x06,0xf8,0x23,0x9e,0xd5,0xfa,0xba,0x50,0xc8,0x45,0x96,0x44,0x7c,0x30,0x7f,0x7f};
    sm2_fn_from_bytes(augend, augend24);
    sm2_fn_from_bytes(addend, addend24);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum24, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend25[32] = {0x4b,0x7e,0x75,0x24,0xad,0x88,0x41,0x81,0xae,0xd1,0x58,0x4a,0x4f,0x48,0x07,0x96,0x63,0x00,0x24,0xc2,0xb5,0x6c,0x38,0xae,0xe6,0xf6,0x1b,0x92,0x1d,0x56,0x68,0xc9};
    static std::uint8_t addend25[32] = {0x7c,0xd4,0x46,0x6d,0xe3,0x92,0xf4,0xd4,0xb4,0x24,0x88,0x7c,0x41,0x18,0xe1,0xcd,0xaa,0x59,0x05,0x68,0x86,0x6a,0x8b,0x91,0xeb,0xc9,0x4a,0x12,0x44,0x43,0x78,0x15};
    static std::uint8_t sum25[32]    = {0xc8,0x52,0xbb,0x92,0x91,0x1b,0x36,0x56,0x62,0xf5,0xe0,0xc6,0x90,0x60,0xe9,0x64,0x0d,0x59,0x2a,0x2b,0x3b,0xd6,0xc4,0x40,0xd2,0xbf,0x65,0xa4,0x61,0x99,0xe0,0xde};
    sm2_fn_from_bytes(augend, augend25);
    sm2_fn_from_bytes(addend, addend25);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum25, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend26[32] = {0xaf,0xb3,0xee,0x9a,0x65,0x21,0xe0,0xe4,0x29,0x6c,0xaf,0x8f,0x05,0xa0,0xc7,0xa8,0x62,0x9d,0xab,0x34,0xbe,0x36,0x29,0x20,0x02,0x8d,0x77,0x94,0xd9,0xc2,0x5b,0xe2};
    static std::uint8_t addend26[32] = {0x01,0xb4,0x95,0x14,0x37,0x18,0x97,0xf2,0x5f,0x00,0x25,0xe8,0x76,0x3c,0x46,0x39,0x62,0xa0,0x09,0xf0,0xbf,0xce,0x65,0x9d,0x1d,0x38,0x79,0x8b,0x30,0x8f,0xc8,0x6f};
    static std::uint8_t sum26[32]    = {0xb1,0x68,0x83,0xae,0x9c,0x3a,0x78,0xd6,0x88,0x6c,0xd5,0x77,0x7b,0xdd,0x0d,0xe1,0xc5,0x3d,0xb5,0x25,0x7e,0x04,0x8e,0xbd,0x1f,0xc5,0xf1,0x20,0x0a,0x52,0x24,0x51};
    sm2_fn_from_bytes(augend, augend26);
    sm2_fn_from_bytes(addend, addend26);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum26, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend27[32] = {0x73,0x22,0xce,0x65,0x47,0xf9,0xdc,0x1d,0x3a,0xec,0xcc,0x39,0x56,0x34,0xdd,0x64,0x5a,0x81,0xf5,0x39,0x17,0xa8,0x25,0x87,0xa5,0x93,0xf1,0xc1,0x54,0x99,0x5d,0x87};
    static std::uint8_t addend27[32] = {0x69,0xbb,0x70,0x59,0xdb,0x93,0x83,0xb5,0x9b,0xa6,0xed,0x8c,0x9b,0xf5,0x4e,0x15,0x52,0x88,0x26,0x30,0x32,0x94,0xfa,0x2c,0xf1,0x0a,0xe0,0x62,0x28,0x67,0xcf,0xf3};
    static std::uint8_t sum27[32]    = {0xdc,0xde,0x3e,0xbf,0x23,0x8d,0x5f,0xd2,0xd6,0x93,0xb9,0xc5,0xf2,0x2a,0x2b,0x79,0xad,0x0a,0x1b,0x69,0x4a,0x3d,0x1f,0xb4,0x96,0x9e,0xd2,0x23,0x7d,0x01,0x2d,0x7a};
    sm2_fn_from_bytes(augend, augend27);
    sm2_fn_from_bytes(addend, addend27);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum27, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend28[32] = {0x36,0x80,0x39,0xca,0xff,0x6e,0x45,0x36,0x84,0x4f,0x80,0x81,0x4f,0x10,0xb1,0x01,0xe7,0x27,0x45,0x01,0x4d,0x39,0x32,0x03,0xbe,0x0a,0x58,0xc1,0xb3,0x1a,0x46,0x2b};
    static std::uint8_t addend28[32] = {0xe4,0x12,0x10,0xa4,0x75,0x64,0x17,0x07,0x9b,0xb3,0x6b,0x75,0xfe,0xcf,0x32,0x63,0x3e,0x5b,0x2d,0xe8,0x62,0xe7,0x15,0xfd,0xa4,0x7d,0x42,0x6f,0xec,0x91,0x83,0x5f};
    static std::uint8_t sum28[32]    = {0x1a,0x92,0x4a,0x70,0x74,0xd2,0x5c,0x3e,0x20,0x02,0xeb,0xf7,0x4d,0xdf,0xe3,0x65,0xb3,0x7e,0x93,0x7e,0x8e,0x5a,0x42,0xd6,0x0e,0xcb,0xa7,0x28,0x65,0xd6,0x88,0x67};
    sm2_fn_from_bytes(augend, augend28);
    sm2_fn_from_bytes(addend, addend28);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum28, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend29[32] = {0x37,0x8d,0x3e,0x56,0x6a,0xee,0xd7,0x54,0x80,0x2c,0x50,0x7b,0xcd,0x30,0x77,0x72,0xe0,0x65,0x79,0x83,0x25,0xbd,0x07,0xf6,0x72,0xc0,0x5e,0x95,0x41,0x1c,0x33,0x63};
    static std::uint8_t addend29[32] = {0xd4,0x39,0x07,0x72,0x3a,0x59,0x03,0x6c,0xad,0x77,0x79,0xc0,0x25,0xb7,0xc2,0x96,0xfd,0xde,0x88,0xd7,0xf6,0xc6,0x24,0x83,0xcf,0x82,0x04,0x0b,0xd6,0x94,0xed,0xd1};
    static std::uint8_t sum29[32]    = {0x0b,0xc6,0x45,0xc9,0xa5,0x47,0xda,0xc1,0x2d,0xa3,0xca,0x3b,0xf2,0xe8,0x3a,0x0a,0x6c,0x40,0x22,0xef,0xfa,0xbd,0x27,0x4e,0xee,0x86,0x6e,0x97,0xdd,0xdb,0xe0,0x11};
    sm2_fn_from_bytes(augend, augend29);
    sm2_fn_from_bytes(addend, addend29);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum29, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend30[32] = {0xc8,0x30,0xcb,0xfb,0x20,0x36,0x14,0x32,0xe3,0x5e,0xc4,0x9e,0x4a,0xf7,0xc4,0xa0,0x5d,0x02,0xac,0xf0,0x79,0x05,0xe2,0x6a,0x34,0x44,0x04,0x0c,0xda,0x42,0xa0,0x88};
    static std::uint8_t addend30[32] = {0x12,0x16,0x70,0xe2,0xeb,0x35,0xec,0x20,0x83,0x07,0x63,0xa0,0xbf,0x2c,0x0a,0xa6,0x3c,0x14,0xf8,0x7c,0x1c,0x2b,0x6f,0xf1,0x54,0x94,0x56,0x23,0xc1,0x24,0xf0,0xbb};
    static std::uint8_t sum30[32]    = {0xda,0x47,0x3c,0xde,0x0b,0x6c,0x00,0x53,0x66,0x66,0x28,0x3f,0x0a,0x23,0xcf,0x46,0x99,0x17,0xa5,0x6c,0x95,0x31,0x52,0x5b,0x88,0xd8,0x5a,0x30,0x9b,0x67,0x91,0x43};
    sm2_fn_from_bytes(augend, augend30);
    sm2_fn_from_bytes(addend, addend30);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum30, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend31[32] = {0xeb,0xd4,0x53,0xb9,0x34,0x70,0xf3,0x2e,0x8a,0x15,0x12,0x5b,0x89,0xe1,0xf8,0x6e,0xaf,0x9d,0x1d,0x4b,0xf0,0xc3,0xbb,0x9f,0x03,0x78,0x83,0xc9,0x85,0xf9,0x42,0xa2};
    static std::uint8_t addend31[32] = {0xeb,0xfc,0x37,0x69,0xcd,0x3a,0xdd,0xc5,0x10,0xee,0x04,0x8c,0x25,0xb7,0x7f,0xdd,0x14,0xe0,0x93,0x66,0x5a,0x4e,0x05,0xca,0x50,0x6a,0xe5,0x7a,0x2a,0xab,0xdc,0x2d};
    static std::uint8_t sum31[32]    = {0xd7,0xd0,0x8b,0x24,0x01,0xab,0xd0,0xf3,0x9b,0x03,0x16,0xe7,0xaf,0x99,0x78,0x4c,0x52,0x79,0xd1,0x47,0x29,0x4b,0xbc,0x3e,0x00,0x27,0x75,0x3a,0x76,0xcf,0xdd,0xac};
    sm2_fn_from_bytes(augend, augend31);
    sm2_fn_from_bytes(addend, addend31);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum31, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend32[32] = {0x67,0xcb,0x09,0xde,0xa1,0x3a,0x2b,0xa6,0xa7,0x61,0x2f,0x74,0x60,0x74,0x8c,0xc9,0x60,0xbb,0x2c,0x22,0xf3,0x42,0x63,0x28,0x6c,0x8c,0x25,0x54,0x9f,0x29,0x3f,0x75};
    static std::uint8_t addend32[32] = {0xb1,0xef,0x7b,0xe6,0x6e,0xb2,0x07,0xaf,0xd0,0x9c,0xdb,0x94,0xdd,0x54,0x16,0xe7,0x8f,0xb9,0x38,0x21,0x27,0x48,0xd4,0x95,0x2b,0xd0,0x92,0xe5,0x16,0xcc,0x62,0x0f};
    static std::uint8_t sum32[32]    = {0x19,0xba,0x85,0xc6,0x0f,0xec,0x33,0x56,0x77,0xfe,0x0b,0x09,0x3d,0xc8,0xa3,0xb1,0x7e,0x70,0x84,0xd8,0xf8,0xc5,0x32,0x92,0x44,0xa0,0xc4,0x30,0x7c,0x20,0x60,0x61};
    sm2_fn_from_bytes(augend, augend32);
    sm2_fn_from_bytes(addend, addend32);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum32, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend33[32] = {0x50,0x14,0xec,0xb5,0x7a,0xb6,0x6a,0xb2,0x63,0x34,0x81,0x7a,0x92,0xf5,0x89,0xd0,0x18,0x29,0xa2,0x63,0xaa,0xe3,0x2a,0xa7,0x30,0xc7,0xad,0x02,0x23,0x55,0x35,0x36};
    static std::uint8_t addend33[32] = {0xe4,0xa3,0x9b,0x1f,0xc7,0x60,0x81,0xf0,0xf9,0xe9,0x8b,0xf8,0x7c,0x14,0x71,0x07,0x83,0x01,0xdd,0xe1,0xb8,0xf7,0xfc,0xeb,0xf8,0xf4,0x70,0x5b,0x36,0x1c,0x93,0x5a};
    static std::uint8_t sum33[32]    = {0x34,0xb8,0x87,0xd6,0x42,0x16,0xec,0xa3,0x5d,0x1e,0x0d,0x73,0x0f,0x09,0xfa,0xd8,0x29,0x27,0xa0,0xda,0x42,0x15,0x22,0x67,0xd6,0x00,0x29,0x54,0x1f,0x9c,0x87,0x6d};
    sm2_fn_from_bytes(augend, augend33);
    sm2_fn_from_bytes(addend, addend33);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum33, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend34[32] = {0xf2,0x72,0x40,0xa8,0xf4,0x2f,0x00,0x6a,0x7b,0xc9,0x59,0xee,0xa8,0x80,0x1f,0x83,0x2d,0xea,0x2a,0x46,0xaa,0x25,0xaa,0xad,0x1c,0x2a,0xa5,0xb8,0xea,0x8e,0xb4,0x1c};
    static std::uint8_t addend34[32] = {0x58,0x55,0xbb,0xd3,0x71,0x73,0xec,0x78,0x8a,0xd8,0xa6,0x8a,0x90,0x79,0x37,0x5b,0x9a,0x7c,0x6b,0x1a,0x6a,0xc8,0x04,0x32,0xd6,0x99,0x97,0x49,0x94,0xab,0xfc,0x3a};
    static std::uint8_t sum34[32]    = {0x4a,0xc7,0xfc,0x7d,0x65,0xa2,0xec,0xe3,0x06,0xa2,0x00,0x79,0x38,0xf9,0x56,0xdf,0x56,0x62,0xb5,0xf5,0xf3,0x27,0xa9,0xb4,0x9f,0x08,0x48,0xf9,0x45,0x65,0x6f,0x33};
    sm2_fn_from_bytes(augend, augend34);
    sm2_fn_from_bytes(addend, addend34);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum34, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend35[32] = {0x1e,0xcf,0xc3,0x0c,0x53,0x27,0xdb,0x84,0xf2,0x57,0x5e,0x30,0x44,0x82,0xed,0x71,0x7b,0x34,0x65,0xff,0x6d,0x74,0x47,0xba,0xf8,0x3c,0x13,0x8a,0xaf,0x2c,0xe7,0x04};
    static std::uint8_t addend35[32] = {0x56,0xd9,0xd0,0x05,0x8c,0xc9,0xc5,0x76,0x86,0x45,0xe7,0x45,0xba,0xa5,0x77,0xc0,0x4d,0xbd,0xbd,0xd9,0xbe,0x2d,0xe7,0x83,0x5c,0x48,0xaa,0x58,0x3c,0xb5,0x17,0xd7};
    static std::uint8_t sum35[32]    = {0x75,0xa9,0x93,0x11,0xdf,0xf1,0xa0,0xfb,0x78,0x9d,0x45,0x75,0xff,0x28,0x65,0x31,0xc8,0xf2,0x23,0xd9,0x2b,0xa2,0x2f,0x3e,0x54,0x84,0xbd,0xe2,0xeb,0xe1,0xfe,0xdb};
    sm2_fn_from_bytes(augend, augend35);
    sm2_fn_from_bytes(addend, addend35);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum35, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend36[32] = {0xde,0x43,0x70,0x29,0x67,0xb6,0x13,0x97,0x26,0x51,0xb8,0x18,0x91,0x9c,0x4d,0x9e,0xef,0xcd,0x29,0x2a,0xd6,0x1f,0xa3,0xad,0x72,0x6b,0xa0,0x35,0xb7,0x61,0x7b,0x94};
    static std::uint8_t addend36[32] = {0xa3,0x14,0x29,0x2e,0x18,0x7a,0xdc,0xab,0xb0,0x1a,0xf5,0xfb,0xe0,0x77,0xf6,0xb1,0x50,0x82,0x72,0x52,0x06,0xd9,0x09,0xdc,0xeb,0x8e,0x53,0xae,0xb1,0xce,0xcd,0x6e};
    static std::uint8_t sum36[32]    = {0x81,0x57,0x99,0x58,0x80,0x30,0xf0,0x42,0xd6,0x6c,0xae,0x14,0x72,0x14,0x44,0x50,0xce,0x4b,0xbc,0x11,0xbb,0x32,0xa8,0x5f,0x0a,0x3d,0xff,0xdb,0x2f,0x5b,0x07,0xdf};
    sm2_fn_from_bytes(augend, augend36);
    sm2_fn_from_bytes(addend, addend36);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum36, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend37[32] = {0x6f,0x6a,0x9e,0x2b,0xe6,0xff,0x3d,0xa3,0x3b,0xfa,0x5a,0xc4,0xba,0x4b,0x85,0xa6,0xf2,0x22,0x15,0x64,0x94,0x14,0x01,0xd9,0x38,0xdb,0x8a,0x7e,0xf4,0x6c,0x3a,0x87};
    static std::uint8_t addend37[32] = {0x86,0x9a,0x20,0x28,0x58,0xac,0x72,0x04,0xd2,0xbc,0x70,0xd6,0x5b,0x53,0xa8,0x7f,0x6b,0x5f,0x9d,0x6a,0xff,0xbb,0xfb,0xdb,0x80,0x46,0x49,0x85,0x20,0x30,0xe6,0x6c};
    static std::uint8_t sum37[32]    = {0xf6,0x04,0xbe,0x54,0x3f,0xab,0xaf,0xa8,0x0e,0xb6,0xcb,0x9b,0x15,0x9f,0x2e,0x26,0x5d,0x81,0xb2,0xcf,0x93,0xcf,0xfd,0xb4,0xb9,0x21,0xd4,0x04,0x14,0x9d,0x20,0xf3};
    sm2_fn_from_bytes(augend, augend37);
    sm2_fn_from_bytes(addend, addend37);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum37, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend38[32] = {0x6c,0xf8,0x59,0xe1,0x62,0x83,0x2d,0x06,0xb5,0xb6,0x20,0x27,0x6e,0xe7,0xfd,0x18,0x54,0x3f,0x08,0xad,0x44,0x1d,0x6b,0x18,0x36,0x98,0x33,0x69,0x1e,0xc4,0x6c,0x05};
    static std::uint8_t addend38[32] = {0x95,0xe5,0xe7,0xc2,0xf6,0xf8,0xba,0xa9,0x44,0x3b,0x93,0x86,0xa6,0xaa,0xd9,0x65,0xc5,0x0a,0xb5,0x8f,0xf4,0x3d,0x14,0x51,0xb8,0x01,0xa5,0x4f,0xc9,0x93,0x0b,0xba};
    static std::uint8_t sum38[32]    = {0x02,0xde,0x41,0xa5,0x59,0x7b,0xe7,0xaf,0xf9,0xf1,0xb3,0xae,0x15,0x92,0xd6,0x7e,0xa7,0x45,0xde,0xd2,0x16,0x94,0x7a,0x3e,0x9a,0xdd,0xe4,0xaf,0xae,0x82,0x36,0x9c};
    sm2_fn_from_bytes(augend, augend38);
    sm2_fn_from_bytes(addend, addend38);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum38, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend39[32] = {0x85,0xbe,0x66,0xe6,0x67,0x42,0x4a,0x74,0x34,0x02,0xd0,0x8b,0x60,0x15,0x99,0xec,0xd1,0x58,0xb9,0xd5,0x06,0xb4,0x2c,0x63,0xd3,0x19,0x65,0xf9,0xfd,0x16,0xbf,0xec};
    static std::uint8_t addend39[32] = {0xe9,0x10,0x82,0x0c,0x5e,0xae,0xaf,0x4f,0xf8,0x41,0x85,0x97,0x75,0x18,0x93,0xc1,0x0c,0xd3,0xba,0x94,0x33,0xb4,0x6c,0xb0,0x13,0xda,0x8a,0xc0,0x2b,0x49,0x58,0x5e};
    static std::uint8_t sum39[32]    = {0x6e,0xce,0xe8,0xf3,0xc5,0xf0,0xf9,0xc4,0x2c,0x44,0x56,0x22,0xd5,0x2e,0x2d,0xae,0x6c,0x28,0x94,0xfe,0x18,0xa2,0x93,0xe8,0x93,0x37,0xfc,0xb0,0xee,0x8a,0xd7,0x27};
    sm2_fn_from_bytes(augend, augend39);
    sm2_fn_from_bytes(addend, addend39);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum39, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend40[32] = {0xe8,0x33,0xaf,0x8c,0xec,0xba,0x84,0x0e,0xe1,0xe0,0x32,0x02,0xe8,0x82,0x63,0x37,0xb3,0xa5,0xb7,0x3b,0xda,0xc1,0x2b,0xb3,0xb5,0x27,0x39,0x63,0x3c,0xbb,0x51,0x98};
    static std::uint8_t addend40[32] = {0xe8,0x8a,0xc1,0x4c,0xb9,0xe9,0xd3,0xec,0xbe,0x64,0x28,0x30,0xc2,0x60,0x3b,0x07,0xa7,0x06,0x31,0x09,0xda,0x66,0xe7,0xf7,0x01,0x25,0x58,0x98,0x1f,0x8f,0xa2,0x05};
    static std::uint8_t sum40[32]    = {0xd0,0xbe,0x70,0xda,0xa6,0xa4,0x57,0xfb,0xa0,0x44,0x5a,0x33,0xaa,0xe2,0x9e,0x3f,0xe8,0xa8,0x08,0xda,0x93,0x62,0x0e,0x7f,0x62,0x90,0x9d,0xf2,0x22,0x75,0xb2,0x7a};
    sm2_fn_from_bytes(augend, augend40);
    sm2_fn_from_bytes(addend, addend40);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum40, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend41[32] = {0xe6,0x84,0x5a,0xa5,0x9f,0x29,0xb2,0xa2,0x51,0xe5,0x8f,0x26,0x0d,0xbb,0xa3,0xfd,0x93,0x0b,0x05,0x81,0xd6,0x68,0x08,0xf2,0x77,0x64,0xfa,0xe2,0xa7,0x25,0x21,0xdc};
    static std::uint8_t addend41[32] = {0xe8,0xcf,0x68,0x1b,0xc6,0x6a,0xcd,0x3b,0x85,0x80,0x68,0x57,0xf1,0x45,0xe5,0x76,0x23,0x71,0x32,0x0c,0xc2,0x75,0xaa,0x0c,0x0d,0xcb,0x57,0x48,0x03,0x60,0x80,0xc4};
    static std::uint8_t sum41[32]    = {0xcf,0x53,0xc2,0xc2,0x65,0x94,0x7f,0xdd,0xd7,0x65,0xf7,0x7d,0xff,0x01,0x89,0x74,0x44,0x78,0x58,0x23,0x77,0x17,0xad,0xd3,0x31,0x74,0x5e,0x21,0x70,0xb0,0x61,0x7d};
    sm2_fn_from_bytes(augend, augend41);
    sm2_fn_from_bytes(addend, addend41);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum41, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend42[32] = {0x91,0x2c,0x3c,0x5b,0xd3,0xd1,0x5c,0x9f,0xdd,0x08,0x23,0xf7,0xb8,0xb5,0x4f,0x1c,0xb7,0xb2,0x1d,0x0d,0x41,0x60,0xb3,0x9c,0x36,0x9f,0x95,0xe8,0xc0,0x36,0xa3,0x4b};
    static std::uint8_t addend42[32] = {0xd8,0x7c,0x39,0xf0,0x10,0x9e,0x53,0xd5,0x4b,0xc6,0xaa,0xba,0x5a,0x63,0x3d,0xa2,0xd2,0x79,0x10,0xc4,0xcf,0x0e,0x49,0x8e,0x81,0x6d,0x98,0x8f,0x3c,0xfe,0xfc,0x8c};
    static std::uint8_t sum42[32]    = {0x69,0xa8,0x76,0x4c,0xe4,0x6f,0xb0,0x75,0x28,0xce,0xce,0xb2,0x13,0x18,0x8c,0xc0,0x18,0x27,0x4e,0x66,0xee,0xa8,0xf7,0xff,0x64,0x51,0x3a,0x6e,0xc3,0x60,0x5e,0xb4};
    sm2_fn_from_bytes(augend, augend42);
    sm2_fn_from_bytes(addend, addend42);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum42, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend43[32] = {0xd5,0x21,0x98,0x36,0xf5,0xdb,0x0d,0xb2,0xe2,0x62,0xc2,0xc1,0x85,0x4d,0xcc,0x7d,0xa7,0xc3,0x26,0x06,0x99,0x9a,0xea,0x5f,0x00,0xb4,0x27,0x56,0xea,0xd9,0x9f,0x13};
    static std::uint8_t addend43[32] = {0xb8,0x1d,0x9e,0x15,0xe4,0x2f,0x4d,0x3a,0x59,0x4e,0x86,0xd8,0xeb,0xe5,0x73,0xec,0x52,0xc3,0x00,0x6e,0x6c,0xfb,0x51,0xc9,0xe5,0xa7,0xb6,0xf9,0xb1,0x59,0xf3,0x34};
    static std::uint8_t sum43[32]    = {0x8d,0x3f,0x36,0x4d,0xda,0x0a,0x5a,0xed,0x3b,0xb1,0x49,0x9a,0x71,0x33,0x40,0x6a,0x88,0x82,0x47,0x09,0xe4,0xd0,0x36,0xfd,0x92,0x9f,0xea,0x47,0x62,0x5e,0x51,0x24};
    sm2_fn_from_bytes(augend, augend43);
    sm2_fn_from_bytes(addend, addend43);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum43, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend44[32] = {0xd3,0x9d,0x49,0x50,0x80,0x8a,0x76,0xc3,0x7b,0xec,0x7c,0x25,0xf7,0xc5,0xb1,0xba,0xd9,0x19,0xba,0xd8,0x19,0x44,0xed,0x3f,0xa4,0xe4,0xcf,0x25,0xf3,0x0e,0x2a,0xe2};
    static std::uint8_t addend44[32] = {0x7d,0xca,0x91,0x66,0xc0,0x47,0x81,0x43,0xd6,0x04,0xb8,0xef,0xd4,0x59,0xe9,0x22,0x07,0x09,0xd2,0xa0,0x84,0x1e,0x83,0x80,0xa1,0x04,0x32,0x54,0x00,0xd2,0xec,0x0f};
    static std::uint8_t sum44[32]    = {0x51,0x67,0xda,0xb8,0x40,0xd1,0xf8,0x07,0x51,0xf1,0x35,0x15,0xcc,0x1f,0x9a,0xdd,0x6e,0x1f,0xae,0x0d,0x7b,0x9d,0x6b,0x94,0xf2,0x2d,0x0d,0x70,0xba,0x0b,0xd5,0xce};
    sm2_fn_from_bytes(augend, augend44);
    sm2_fn_from_bytes(addend, addend44);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum44, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend45[32] = {0x88,0x75,0x0a,0x07,0x46,0x3c,0xe0,0x28,0x36,0x23,0x8e,0x2b,0xf2,0xa2,0x4e,0xab,0xca,0x2c,0x9c,0x57,0x98,0x0c,0x66,0xce,0x8d,0x3d,0x1c,0x0d,0x6c,0xb6,0xa6,0xad};
    static std::uint8_t addend45[32] = {0x4a,0xa0,0xe1,0xc1,0x65,0x14,0x31,0xc0,0x7c,0x0b,0x71,0xe6,0x5b,0x6c,0xe0,0x8b,0xa9,0xb6,0x44,0x41,0x17,0x33,0x53,0x92,0xfb,0x89,0xed,0x0e,0x99,0x84,0xed,0xfa};
    static std::uint8_t sum45[32]    = {0xd3,0x15,0xeb,0xc8,0xab,0x51,0x11,0xe8,0xb2,0x2f,0x00,0x12,0x4e,0x0f,0x2f,0x37,0x73,0xe2,0xe0,0x98,0xaf,0x3f,0xba,0x61,0x88,0xc7,0x09,0x1c,0x06,0x3b,0x94,0xa7};
    sm2_fn_from_bytes(augend, augend45);
    sm2_fn_from_bytes(addend, addend45);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum45, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend46[32] = {0x01,0x86,0x0e,0xb6,0x17,0xb3,0xa8,0x84,0x8f,0xf4,0x61,0xd3,0x4b,0xc2,0xc4,0x30,0xca,0x1f,0x01,0xd1,0x44,0xcf,0x6a,0x75,0xc5,0x29,0x48,0x9c,0x3a,0x5a,0x8c,0xf5};
    static std::uint8_t addend46[32] = {0xe9,0x7c,0xd8,0x47,0x0c,0x21,0xcf,0xef,0x82,0x7c,0x32,0x0c,0xdb,0xcd,0x4b,0x82,0xe5,0x4d,0x9d,0x5d,0x6c,0xcf,0xb7,0x55,0x9a,0x88,0xcd,0xc0,0xd5,0x5b,0x41,0xbc};
    static std::uint8_t sum46[32]    = {0xeb,0x02,0xe6,0xfd,0x23,0xd5,0x78,0x74,0x12,0x70,0x93,0xe0,0x27,0x90,0x0f,0xb3,0xaf,0x6c,0x9f,0x2e,0xb1,0x9f,0x21,0xcb,0x5f,0xb2,0x16,0x5d,0x0f,0xb5,0xce,0xb1};
    sm2_fn_from_bytes(augend, augend46);
    sm2_fn_from_bytes(addend, addend46);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum46, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend47[32] = {0x1d,0x76,0x1e,0x9a,0x31,0xde,0xe0,0xe6,0x60,0x82,0xa9,0xf4,0x44,0x0f,0x2c,0xfd,0x58,0x8a,0x6a,0xfb,0xef,0xae,0x92,0x80,0x4a,0xdd,0x24,0x05,0xfe,0x61,0xc4,0x09};
    static std::uint8_t addend47[32] = {0xfc,0x66,0xfe,0xf5,0x0f,0x6f,0x04,0x2a,0xdd,0xcc,0xcc,0xe1,0xa0,0x42,0xe8,0x9c,0x2c,0xe9,0x4b,0xe3,0x36,0x1a,0x5c,0x3a,0xc8,0xa8,0x2b,0x4f,0xea,0x14,0xf0,0xc9};
    static std::uint8_t sum47[32]    = {0x19,0xdd,0x1d,0x90,0x41,0x4d,0xe5,0x11,0x3e,0x4f,0x76,0xd5,0xe4,0x52,0x15,0x9a,0x13,0x6f,0xd7,0x74,0x04,0x02,0xe9,0x8f,0xbf,0xc9,0x5b,0x4c,0xae,0xa1,0x73,0xaf};
    sm2_fn_from_bytes(augend, augend47);
    sm2_fn_from_bytes(addend, addend47);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum47, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend48[32] = {0x60,0x01,0x7b,0x9c,0x8f,0xf8,0xff,0x42,0xc2,0xe5,0xda,0xb7,0x8c,0x6b,0x1d,0xe7,0xf0,0x24,0x94,0x32,0x1b,0x2b,0x72,0xa7,0x13,0xc9,0xfe,0xa7,0xda,0x24,0xff,0xdc};
    static std::uint8_t addend48[32] = {0x13,0x67,0x26,0x52,0x26,0xad,0xa6,0x94,0x4a,0x41,0x96,0x80,0xca,0x21,0x83,0x5d,0x74,0xa6,0xcf,0xab,0xbf,0x5d,0x60,0xf1,0xc3,0x6d,0x15,0x6a,0x58,0x8a,0xf4,0x91};
    static std::uint8_t sum48[32]    = {0x73,0x68,0xa1,0xee,0xb6,0xa6,0xa5,0xd7,0x0d,0x27,0x71,0x38,0x56,0x8c,0xa1,0x45,0x64,0xcb,0x63,0xdd,0xda,0x88,0xd3,0x98,0xd7,0x37,0x14,0x12,0x32,0xaf,0xf4,0x6d};
    sm2_fn_from_bytes(augend, augend48);
    sm2_fn_from_bytes(addend, addend48);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum48, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend49[32] = {0xb3,0xc1,0x46,0xe3,0xb1,0x47,0x2c,0x51,0x8c,0x00,0xb8,0x5c,0x37,0xef,0xed,0x46,0xff,0xbe,0x32,0xdd,0x23,0x4b,0xe9,0xc6,0x0c,0x51,0x5e,0x46,0x0f,0xbd,0x99,0x26};
    static std::uint8_t addend49[32] = {0x4b,0xef,0xb1,0x74,0xfd,0x86,0xb0,0x91,0x6c,0xc0,0x77,0x8a,0x3e,0x09,0x9e,0x28,0x0d,0x35,0xc5,0xeb,0x84,0x5c,0xcc,0xd2,0xd1,0xce,0x1d,0xe3,0xda,0x04,0xcf,0x25};
    static std::uint8_t sum49[32]    = {0xff,0xb0,0xf8,0x58,0xae,0xcd,0xdc,0xe2,0xf8,0xc1,0x2f,0xe6,0x75,0xf9,0x8b,0x6f,0x0c,0xf3,0xf8,0xc8,0xa7,0xa8,0xb6,0x98,0xde,0x1f,0x7c,0x29,0xe9,0xc2,0x68,0x4b};
    sm2_fn_from_bytes(augend, augend49);
    sm2_fn_from_bytes(addend, addend49);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum49, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend50[32] = {0xba,0xb4,0xe0,0xfe,0xf4,0xcc,0x3c,0x94,0x40,0xa7,0x6d,0x5e,0x5c,0x52,0xcd,0xe1,0xc7,0x8d,0xe6,0x16,0x0c,0xcc,0xfe,0xca,0x65,0x16,0xd4,0xb6,0x63,0xb4,0xbc,0x82};
    static std::uint8_t addend50[32] = {0x84,0x7c,0xdd,0xc8,0x50,0xfc,0x39,0x11,0x82,0x7d,0x26,0x35,0xa3,0xd9,0x2f,0x6d,0xdf,0x49,0xbb,0x08,0xe7,0x72,0x3b,0xb9,0x2c,0x76,0xf1,0x96,0x7d,0x51,0xb5,0x00};
    static std::uint8_t sum50[32]    = {0x3f,0x31,0xbe,0xc8,0x45,0xc8,0x75,0xa5,0xc3,0x24,0x93,0x94,0x00,0x2b,0xfd,0x50,0x34,0xd3,0xc1,0xb3,0xd2,0x79,0x35,0x58,0x3d,0xd1,0xd2,0x43,0xa7,0x31,0x30,0x5f};
    sm2_fn_from_bytes(augend, augend50);
    sm2_fn_from_bytes(addend, addend50);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum50, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend51[32] = {0xbb,0xc7,0xda,0x67,0x60,0x83,0x5c,0x2e,0xfe,0x49,0x33,0x61,0xc6,0xa6,0x5f,0x60,0x6c,0xd0,0xf3,0x1e,0x28,0x5a,0x54,0x14,0xd1,0x1a,0x62,0xb6,0xc3,0x06,0xed,0x60};
    static std::uint8_t addend51[32] = {0x31,0x10,0xcc,0xf5,0x23,0xcf,0xce,0xab,0xc7,0x7d,0xb5,0x4a,0x7f,0xfb,0xaf,0x20,0x5c,0x99,0xeb,0x98,0x6e,0x54,0x3b,0x2a,0x1a,0x4d,0x12,0xac,0xf1,0x4b,0xc5,0x31};
    static std::uint8_t sum51[32]    = {0xec,0xd8,0xa7,0x5c,0x84,0x53,0x2a,0xda,0xc5,0xc6,0xe8,0xac,0x46,0xa2,0x0e,0x80,0xc9,0x6a,0xde,0xb6,0x96,0xae,0x8f,0x3e,0xeb,0x67,0x75,0x63,0xb4,0x52,0xb2,0x91};
    sm2_fn_from_bytes(augend, augend51);
    sm2_fn_from_bytes(addend, addend51);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum51, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend52[32] = {0x6f,0x00,0xb5,0xe7,0xde,0x7a,0xd6,0xdc,0x2e,0xd2,0xc3,0x3b,0x47,0x2e,0xa0,0x96,0xe8,0x27,0x42,0x4b,0xa7,0x37,0x82,0x67,0x58,0x99,0xdf,0x99,0xa8,0x82,0x45,0x44};
    static std::uint8_t addend52[32] = {0x50,0x4d,0xa4,0x77,0x1a,0x8a,0x26,0xb0,0x5d,0xc3,0x31,0x7b,0xce,0x37,0xba,0x52,0xe3,0x63,0xaf,0x0a,0xb0,0xa1,0x0e,0x7e,0x2b,0x8a,0x3e,0x9a,0x9d,0x1d,0x8f,0x38};
    static std::uint8_t sum52[32]    = {0xbf,0x4e,0x5a,0x5e,0xf9,0x04,0xfd,0x8c,0x8c,0x95,0xf4,0xb7,0x15,0x66,0x5a,0xe9,0xcb,0x8a,0xf1,0x56,0x57,0xd8,0x90,0xe5,0x84,0x24,0x1e,0x34,0x45,0x9f,0xd4,0x7c};
    sm2_fn_from_bytes(augend, augend52);
    sm2_fn_from_bytes(addend, addend52);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum52, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend53[32] = {0xda,0x79,0x49,0x56,0xec,0x2a,0x0c,0x13,0x98,0x1e,0x26,0x59,0x46,0x06,0x8a,0x54,0x26,0x22,0x60,0x21,0xb3,0x01,0xfa,0xc4,0x23,0x55,0x3f,0x57,0xc0,0xd6,0x86,0x05};
    static std::uint8_t addend53[32] = {0x8d,0xbc,0x20,0x0f,0x5d,0xca,0xa4,0xb3,0xfd,0xf8,0x09,0x65,0x23,0x7b,0xcd,0x90,0xab,0x06,0x0a,0x49,0x08,0xb9,0x55,0xe9,0x31,0x4c,0x5f,0x47,0x0e,0x59,0xdb,0x58};
    static std::uint8_t sum53[32]    = {0x68,0x35,0x69,0x67,0x49,0xf4,0xb0,0xc7,0x96,0x16,0x2f,0xbe,0x69,0x82,0x57,0xe5,0x5f,0x24,0x8a,0xff,0x99,0xf5,0x4b,0x82,0x00,0xe5,0xaa,0x95,0x95,0x5b,0x20,0x3a};
    sm2_fn_from_bytes(augend, augend53);
    sm2_fn_from_bytes(addend, addend53);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum53, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend54[32] = {0x60,0x09,0x20,0x48,0x7b,0x72,0xfa,0x0a,0xbf,0xb0,0x66,0x10,0x43,0x9e,0x9e,0x0b,0xd8,0xae,0x57,0x56,0x07,0x1a,0x3f,0xab,0xe5,0x2a,0x3d,0xc1,0xed,0x5e,0x38,0x26};
    static std::uint8_t addend54[32] = {0x4f,0x6b,0x7a,0xb8,0x9e,0x1f,0x37,0x23,0xe8,0xc1,0x74,0x5a,0xe6,0x62,0xd5,0x3a,0x66,0x79,0x38,0x25,0x17,0xfe,0x41,0x39,0xcf,0xcf,0x80,0xb4,0x9f,0xa7,0x06,0x44};
    static std::uint8_t sum54[32]    = {0xaf,0x74,0x9b,0x01,0x19,0x92,0x31,0x2e,0xa8,0x71,0xda,0x6b,0x2a,0x01,0x73,0x46,0x3f,0x27,0x8f,0x7b,0x1f,0x18,0x80,0xe5,0xb4,0xf9,0xbe,0x76,0x8d,0x05,0x3e,0x6a};
    sm2_fn_from_bytes(augend, augend54);
    sm2_fn_from_bytes(addend, addend54);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum54, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend55[32] = {0xe3,0x3d,0x0d,0x1a,0x83,0x59,0x8e,0xdc,0x26,0xf7,0x79,0xf1,0x3d,0x38,0x94,0x3c,0x00,0x4d,0x4d,0x66,0xc0,0xde,0x70,0xc5,0x6d,0xea,0x28,0xac,0x75,0x97,0x9f,0x1f};
    static std::uint8_t addend55[32] = {0xba,0xa7,0xba,0x19,0x05,0xce,0xe0,0x38,0xa5,0x33,0x30,0x25,0x9c,0x4b,0x84,0x1f,0x9a,0xb1,0x12,0x92,0xae,0x01,0xd9,0x93,0x91,0xfb,0xc9,0x44,0xba,0xf9,0x94,0xf8};
    static std::uint8_t sum55[32]    = {0x9d,0xe4,0xc7,0x34,0x89,0x28,0x6f,0x14,0xcc,0x2a,0xaa,0x16,0xd9,0x84,0x18,0x5c,0x28,0xfa,0x80,0x8e,0x4d,0x1a,0x45,0x2d,0xac,0x29,0xfd,0xe7,0xf6,0xbb,0xf2,0xf4};
    sm2_fn_from_bytes(augend, augend55);
    sm2_fn_from_bytes(addend, addend55);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum55, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend56[32] = {0x8d,0x77,0xa5,0xcc,0x9c,0x1c,0xb0,0xb2,0xba,0x9d,0x8c,0xeb,0x77,0x7d,0x20,0x8a,0xed,0xd4,0x10,0x06,0xaa,0x7e,0xbb,0xb6,0xe1,0x09,0xcf,0xbb,0x9a,0xb1,0xb5,0x5a};
    static std::uint8_t addend56[32] = {0x1f,0x63,0x00,0x87,0xe4,0xbf,0x4a,0x58,0xea,0xda,0x56,0x1d,0xd6,0x0b,0x04,0xb1,0x12,0x5b,0x13,0x5f,0x0f,0x30,0x11,0x43,0x32,0x1a,0x9d,0xe6,0x35,0x5a,0xd1,0x42};
    static std::uint8_t sum56[32]    = {0xac,0xda,0xa6,0x54,0x80,0xdb,0xfb,0x0b,0xa5,0x77,0xe3,0x09,0x4d,0x88,0x25,0x3c,0x00,0x2f,0x23,0x65,0xb9,0xae,0xcc,0xfa,0x13,0x24,0x6d,0xa1,0xd0,0x0c,0x86,0x9c};
    sm2_fn_from_bytes(augend, augend56);
    sm2_fn_from_bytes(addend, addend56);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum56, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend57[32] = {0x5d,0x05,0x63,0x3e,0xa0,0x72,0x63,0x9c,0x62,0x42,0x01,0xea,0x50,0xaf,0x83,0x36,0xed,0x47,0xfb,0x1a,0x04,0xa9,0x5a,0x09,0x41,0xd9,0x97,0xa5,0x7b,0xf4,0xed,0x83};
    static std::uint8_t addend57[32] = {0x24,0x17,0x3d,0xf7,0x84,0x6a,0xc6,0x04,0x7b,0x0b,0x57,0x42,0xb8,0x6a,0xb6,0x68,0x23,0x86,0xc2,0x0d,0x33,0x1d,0x04,0x36,0x24,0x4e,0x2c,0x2c,0xdf,0x41,0x78,0x78};
    static std::uint8_t sum57[32]    = {0x81,0x1c,0xa1,0x36,0x24,0xdd,0x29,0xa0,0xdd,0x4d,0x59,0x2d,0x09,0x1a,0x39,0x9f,0x10,0xce,0xbd,0x27,0x37,0xc6,0x5e,0x3f,0x66,0x27,0xc3,0xd2,0x5b,0x36,0x65,0xfb};
    sm2_fn_from_bytes(augend, augend57);
    sm2_fn_from_bytes(addend, addend57);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum57, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend58[32] = {0xe1,0x7d,0x77,0x02,0x1b,0x9b,0x69,0xe7,0xe2,0xb7,0x65,0xb6,0x46,0x16,0xce,0x53,0x9d,0xe7,0xd2,0xc0,0x67,0x0e,0xd5,0x41,0x0e,0x2f,0xce,0x9b,0x47,0xee,0x14,0x13};
    static std::uint8_t addend58[32] = {0x1d,0xff,0x38,0xf8,0x7f,0x44,0xb5,0x8e,0xbd,0xbc,0x8a,0x54,0x44,0x01,0x6b,0xf0,0x03,0xea,0x49,0x7a,0x07,0xed,0x36,0x27,0xc2,0x5f,0x8f,0x40,0x94,0x60,0xff,0x0d};
    static std::uint8_t sum58[32]    = {0xff,0x7c,0xaf,0xfa,0x9a,0xe0,0x1f,0x76,0xa0,0x73,0xf0,0x0a,0x8a,0x18,0x3a,0x43,0xa1,0xd2,0x1c,0x3a,0x6e,0xfc,0x0b,0x68,0xd0,0x8f,0x5d,0xdb,0xdc,0x4f,0x13,0x20};
    sm2_fn_from_bytes(augend, augend58);
    sm2_fn_from_bytes(addend, addend58);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum58, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend59[32] = {0x4a,0x46,0xe5,0x97,0x3b,0x99,0x7c,0x73,0x57,0xfa,0x97,0xbe,0xb9,0xf0,0xd4,0xe3,0xeb,0x94,0xb3,0xc9,0x28,0x73,0x5f,0x1a,0x25,0x83,0xd7,0x5b,0x8e,0x2e,0x8a,0x74};
    static std::uint8_t addend59[32] = {0xa8,0xcf,0x4c,0x16,0xd3,0x7a,0xf0,0x3e,0xdf,0xa7,0x9d,0xe0,0x6b,0x5a,0xf7,0xad,0x21,0x48,0xba,0x6d,0x8a,0xa2,0xb6,0x8b,0x31,0x99,0x95,0x67,0xec,0xd3,0x6d,0x50};
    static std::uint8_t sum59[32]    = {0xf3,0x16,0x31,0xae,0x0f,0x14,0x6c,0xb2,0x37,0xa2,0x35,0x9f,0x25,0x4b,0xcc,0x91,0x0c,0xdd,0x6e,0x36,0xb3,0x16,0x15,0xa5,0x57,0x1d,0x6c,0xc3,0x7b,0x01,0xf7,0xc4};
    sm2_fn_from_bytes(augend, augend59);
    sm2_fn_from_bytes(addend, addend59);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum59, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend60[32] = {0x4b,0xe1,0xc4,0x48,0x0f,0xe5,0x4f,0x8e,0xd5,0x77,0x08,0x30,0x00,0x00,0x8f,0x8d,0x62,0xa9,0xec,0xe6,0xd1,0xe6,0x0f,0xfe,0x54,0xd2,0xc8,0x15,0xab,0xdf,0x52,0x67};
    static std::uint8_t addend60[32] = {0x15,0xb9,0x1c,0x47,0x6e,0xbf,0x36,0xa6,0xce,0x38,0x23,0x7e,0x5c,0x12,0x84,0xb1,0x39,0xdb,0xb8,0xb8,0x74,0x14,0xb5,0xe6,0x48,0xad,0xe9,0xca,0xfc,0x07,0x24,0xfa};
    static std::uint8_t sum60[32]    = {0x61,0x9a,0xe0,0x8f,0x7e,0xa4,0x86,0x35,0xa3,0xaf,0x2b,0xae,0x5c,0x13,0x14,0x3e,0x9c,0x85,0xa5,0x9f,0x45,0xfa,0xc5,0xe4,0x9d,0x80,0xb1,0xe0,0xa7,0xe6,0x77,0x61};
    sm2_fn_from_bytes(augend, augend60);
    sm2_fn_from_bytes(addend, addend60);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum60, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend61[32] = {0x13,0xa7,0x42,0xd7,0xc1,0xbb,0x7a,0x19,0xc8,0x23,0x75,0x82,0xdf,0x15,0xf9,0x2b,0xc5,0xb1,0xfc,0xfa,0xc5,0x34,0xcc,0x6e,0xdc,0xe8,0x36,0x37,0xf2,0x59,0x9c,0x55};
    static std::uint8_t addend61[32] = {0xcc,0xcb,0xf8,0x90,0x1d,0x3a,0x6e,0x95,0x20,0x9b,0x36,0xed,0xf1,0x77,0xd6,0x52,0x80,0x5f,0xc8,0x2e,0xb5,0x03,0x86,0x22,0x88,0x9e,0xcf,0x0b,0xd4,0x8b,0xee,0xef};
    static std::uint8_t sum61[32]    = {0xe0,0x73,0x3b,0x67,0xde,0xf5,0xe8,0xae,0xe8,0xbe,0xac,0x70,0xd0,0x8d,0xcf,0x7e,0x46,0x11,0xc5,0x29,0x7a,0x38,0x52,0x91,0x65,0x87,0x05,0x43,0xc6,0xe5,0x8b,0x44};
    sm2_fn_from_bytes(augend, augend61);
    sm2_fn_from_bytes(addend, addend61);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum61, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend62[32] = {0x19,0x19,0xd5,0x2f,0xd2,0x03,0x51,0x37,0xa8,0x30,0x34,0xea,0x75,0x42,0x6f,0x7d,0xe2,0x7d,0xb0,0x30,0xd6,0xed,0xc4,0x17,0x24,0x04,0xc2,0xb6,0x66,0xb8,0x1b,0x0d};
    static std::uint8_t addend62[32] = {0x01,0x20,0x95,0xe2,0x0d,0x76,0xf9,0xf2,0x9d,0x17,0xf7,0x69,0x5b,0x8b,0x17,0x7f,0xf0,0x78,0xb5,0x48,0x39,0xb1,0x0b,0x41,0x90,0x93,0xcb,0xd0,0xe0,0x09,0x6c,0x2f};
    static std::uint8_t sum62[32]    = {0x1a,0x3a,0x6b,0x11,0xdf,0x7a,0x4b,0x2a,0x45,0x48,0x2c,0x53,0xd0,0xcd,0x86,0xfd,0xd2,0xf6,0x65,0x79,0x10,0x9e,0xcf,0x58,0xb4,0x98,0x8e,0x87,0x46,0xc1,0x87,0x3c};
    sm2_fn_from_bytes(augend, augend62);
    sm2_fn_from_bytes(addend, addend62);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum62, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend63[32] = {0x07,0xff,0x5c,0x67,0xd3,0xf9,0xad,0x71,0x93,0x86,0x92,0x04,0x11,0xc8,0x1f,0xdb,0xee,0x45,0x33,0x9f,0x12,0x4e,0x67,0x0e,0x33,0x1f,0x2a,0xe0,0x99,0x9b,0x12,0xbe};
    static std::uint8_t addend63[32] = {0xd7,0xe7,0xbe,0xdb,0xe5,0xca,0x3a,0x5a,0x68,0x10,0x0b,0x62,0x32,0xfc,0xf1,0x9e,0x9b,0xb9,0xef,0xf6,0x02,0xeb,0x78,0x50,0xdc,0xd9,0x0b,0xeb,0xff,0x42,0x06,0xe5};
    static std::uint8_t sum63[32]    = {0xdf,0xe7,0x1b,0x43,0xb9,0xc3,0xe7,0xcb,0xfb,0x96,0x9d,0x66,0x44,0xc5,0x11,0x7a,0x89,0xff,0x23,0x95,0x15,0x39,0xdf,0x5f,0x0f,0xf8,0x36,0xcc,0x98,0xdd,0x19,0xa3};
    sm2_fn_from_bytes(augend, augend63);
    sm2_fn_from_bytes(addend, addend63);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum63, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend64[32] = {0x7b,0xfb,0x68,0x39,0x3b,0x6a,0x76,0x7b,0xda,0xf0,0xc7,0x4d,0x8c,0xf8,0x20,0x07,0x91,0xdf,0xe7,0x6f,0x99,0x1b,0x9e,0x53,0xe8,0x1a,0xf9,0x84,0x93,0xe5,0xfb,0xf2};
    static std::uint8_t addend64[32] = {0x3b,0x74,0x79,0xca,0x10,0xfb,0x41,0x7a,0x56,0x94,0x33,0x7d,0xca,0x87,0xd0,0xbe,0x7d,0x48,0xf2,0x3f,0xe4,0xd0,0x6a,0xa7,0xfd,0x19,0xdf,0x2b,0x6b,0x1b,0xf6,0x93};
    static std::uint8_t sum64[32]    = {0xb7,0x6f,0xe2,0x03,0x4c,0x65,0xb7,0xf6,0x31,0x84,0xfa,0xcb,0x57,0x7f,0xf0,0xc6,0x0f,0x28,0xd9,0xaf,0x7d,0xec,0x08,0xfb,0xe5,0x34,0xd8,0xaf,0xff,0x01,0xf2,0x85};
    sm2_fn_from_bytes(augend, augend64);
    sm2_fn_from_bytes(addend, addend64);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum64, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend65[32] = {0x30,0x94,0x12,0x50,0x45,0x4e,0x80,0xe7,0x9d,0x20,0x25,0x00,0xd1,0x0b,0x41,0x4a,0x1a,0xd8,0xd0,0x51,0x39,0x94,0x0a,0x60,0x99,0xa3,0xf7,0xcb,0x84,0x76,0x8f,0x60};
    static std::uint8_t addend65[32] = {0xec,0x5f,0xe1,0x3d,0xfb,0x28,0xd4,0xa7,0xa2,0xae,0x87,0x38,0x51,0x76,0x56,0x2a,0x4b,0xe2,0x2c,0xc6,0x3a,0xe1,0xe5,0x65,0x81,0xa0,0x2e,0xf9,0xe9,0x05,0xe8,0x88};
    static std::uint8_t sum65[32]    = {0x1c,0xf3,0xf3,0x8f,0x40,0x77,0x55,0x8f,0x3f,0xce,0xac,0x39,0x22,0x81,0x97,0x74,0xf4,0xb7,0x1d,0xac,0x52,0xaf,0xea,0x9a,0xc7,0x88,0x32,0xbc,0x33,0xa7,0x36,0xc5};
    sm2_fn_from_bytes(augend, augend65);
    sm2_fn_from_bytes(addend, addend65);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum65, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend66[32] = {0x43,0x84,0x3d,0x59,0x8e,0x27,0x45,0x1a,0x35,0x66,0xc5,0xba,0x1b,0xd1,0xbd,0xf1,0xb2,0x93,0x31,0x00,0xa8,0xde,0xd1,0xec,0x25,0x31,0x99,0x57,0xba,0x76,0xa4,0x67};
    static std::uint8_t addend66[32] = {0x91,0x7c,0xfe,0x55,0xaa,0x52,0x12,0x3a,0x69,0x76,0x0e,0x25,0xd1,0xf2,0x57,0x8f,0xd9,0xa9,0xa6,0x7e,0xa6,0xf9,0x49,0xf2,0x10,0x7c,0xe9,0xce,0x5c,0x8b,0x61,0xed};
    static std::uint8_t sum66[32]    = {0xd5,0x01,0x3b,0xaf,0x38,0x79,0x57,0x54,0x9e,0xdc,0xd3,0xdf,0xed,0xc4,0x15,0x81,0x8c,0x3c,0xd7,0x7f,0x4f,0xd8,0x1b,0xde,0x35,0xae,0x83,0x26,0x17,0x02,0x06,0x54};
    sm2_fn_from_bytes(augend, augend66);
    sm2_fn_from_bytes(addend, addend66);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum66, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend67[32] = {0x8f,0x7e,0x98,0xfa,0x96,0x05,0xa4,0x70,0xe0,0xbe,0xa9,0x45,0xdd,0x34,0xa7,0xdc,0xc5,0x4c,0xb7,0x37,0x55,0x88,0xce,0xb3,0xd8,0xbb,0x28,0xd1,0xa2,0x83,0x50,0xf9};
    static std::uint8_t addend67[32] = {0xe1,0x4d,0x6a,0x56,0x19,0xd1,0x49,0x07,0x3b,0xcb,0x26,0xd9,0x8b,0xc6,0x68,0x9f,0x2f,0xbe,0x2e,0xfe,0xaf,0x3a,0x66,0xb6,0xbb,0xfa,0x87,0x59,0x41,0xd0,0x62,0xf6};
    static std::uint8_t sum67[32]    = {0x70,0xcc,0x03,0x51,0xaf,0xd6,0xed,0x78,0x1c,0x89,0xd0,0x1f,0x68,0xfb,0x10,0x7c,0x83,0x07,0x06,0xca,0xe2,0xfd,0x30,0x3f,0x40,0xf9,0xbc,0x21,0xaa,0x7e,0x72,0xcc};
    sm2_fn_from_bytes(augend, augend67);
    sm2_fn_from_bytes(addend, addend67);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum67, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend68[32] = {0x08,0x97,0x61,0x1c,0xe1,0x4f,0xde,0x1c,0xb3,0x4f,0x50,0x95,0x08,0x3c,0xb6,0x33,0x70,0x7e,0x39,0x26,0xd3,0x6e,0xff,0xa7,0x17,0xcb,0x24,0xec,0x7e,0xb8,0x45,0x64};
    static std::uint8_t addend68[32] = {0xd9,0xd0,0x56,0xb9,0xc0,0x87,0x9b,0x2c,0xda,0xaf,0x55,0x44,0xe8,0xf1,0x4b,0xe7,0xc4,0x23,0x19,0x99,0xa7,0x39,0xe2,0xb8,0x86,0xf9,0xda,0xe7,0xbb,0xec,0x79,0x18};
    static std::uint8_t sum68[32]    = {0xe2,0x67,0xb7,0xd6,0xa1,0xd7,0x79,0x49,0x8d,0xfe,0xa5,0xd9,0xf1,0x2e,0x02,0x1b,0x34,0xa1,0x52,0xc0,0x7a,0xa8,0xe2,0x5f,0x9e,0xc4,0xff,0xd4,0x3a,0xa4,0xbe,0x7c};
    sm2_fn_from_bytes(augend, augend68);
    sm2_fn_from_bytes(addend, addend68);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum68, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend69[32] = {0xbc,0x97,0x08,0xe0,0xef,0xff,0xa4,0xde,0xc3,0x41,0x6a,0xac,0x5a,0x96,0x41,0x07,0x35,0xc8,0x83,0xad,0x9d,0xf0,0xe3,0xc7,0x96,0x43,0xa0,0x29,0x35,0x6f,0x29,0xbb};
    static std::uint8_t addend69[32] = {0x73,0x92,0xef,0x55,0x72,0xdf,0xd8,0x38,0xef,0xe1,0xca,0x3a,0x16,0x6e,0x6e,0xd3,0x2e,0x66,0xcb,0xd9,0x6e,0x5b,0xd4,0xb5,0xd6,0x20,0x01,0x7f,0x4c,0xa0,0x5a,0x0c};
    static std::uint8_t sum69[32]    = {0x30,0x29,0xf8,0x37,0x62,0xdf,0x7d,0x17,0xb3,0x23,0x34,0xe6,0x71,0x04,0xaf,0xda,0xf2,0x2b,0x70,0x1b,0xea,0x86,0xb3,0x52,0x18,0xa7,0xad,0x9f,0x48,0x3a,0x42,0xa4};
    sm2_fn_from_bytes(augend, augend69);
    sm2_fn_from_bytes(addend, addend69);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum69, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend70[32] = {0x24,0xe7,0xcb,0x36,0xec,0x31,0x74,0xe6,0x00,0x6f,0x4b,0x47,0x05,0x77,0x3b,0x1f,0x96,0xe6,0x32,0x7e,0x4a,0x41,0xb9,0x11,0x62,0x9b,0x04,0x03,0x34,0xb0,0xfd,0x95};
    static std::uint8_t addend70[32] = {0x28,0x47,0x0c,0x9f,0x05,0xaa,0xdf,0x16,0x90,0x2a,0xbe,0x91,0x5e,0xfa,0xc2,0x22,0x6a,0xda,0x86,0xbc,0x80,0xc2,0xc2,0xd4,0xd4,0x8a,0xc4,0x07,0x36,0xf7,0x05,0xe5};
    static std::uint8_t sum70[32]    = {0x4d,0x2e,0xd7,0xd5,0xf1,0xdc,0x53,0xfc,0x90,0x9a,0x09,0xd8,0x64,0x71,0xfd,0x42,0x01,0xc0,0xb9,0x3a,0xcb,0x04,0x7b,0xe6,0x37,0x25,0xc8,0x0a,0x6b,0xa8,0x03,0x7a};
    sm2_fn_from_bytes(augend, augend70);
    sm2_fn_from_bytes(addend, addend70);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum70, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend71[32] = {0x1f,0x82,0x87,0xcd,0x25,0x1d,0xf1,0x62,0x31,0x4a,0x08,0x5e,0x1a,0x1a,0x98,0x78,0x0d,0x5a,0xcf,0xe8,0xde,0xcc,0xad,0xb9,0x3e,0xce,0x78,0x54,0xee,0xf5,0x55,0x46};
    static std::uint8_t addend71[32] = {0x24,0xca,0x47,0x76,0x9a,0x9c,0xae,0x06,0xf3,0x18,0xf6,0x8a,0x8d,0x0d,0x88,0xb5,0x7a,0x0c,0x75,0x62,0x66,0x97,0x1f,0x38,0xa1,0x3b,0x71,0xe5,0x2f,0x50,0x6c,0x34};
    static std::uint8_t sum71[32]    = {0x44,0x4c,0xcf,0x43,0xbf,0xba,0x9f,0x69,0x24,0x62,0xfe,0xe8,0xa7,0x28,0x21,0x2d,0x87,0x67,0x45,0x4b,0x45,0x63,0xcc,0xf1,0xe0,0x09,0xea,0x3a,0x1e,0x45,0xc1,0x7a};
    sm2_fn_from_bytes(augend, augend71);
    sm2_fn_from_bytes(addend, addend71);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum71, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend72[32] = {0x86,0x4f,0xe3,0xfd,0xa6,0x3d,0x62,0x24,0xe2,0xf3,0x52,0x6b,0x1a,0x1b,0x22,0x57,0x4c,0x3b,0x65,0x11,0x4d,0xe4,0xdc,0x36,0x0f,0x39,0xb1,0x82,0x0b,0x2c,0x46,0xcd};
    static std::uint8_t addend72[32] = {0xe0,0x13,0xae,0x26,0x3a,0xfe,0xf4,0x0b,0x1e,0x22,0x83,0x16,0xbc,0x73,0x1e,0xd7,0xe4,0x5f,0x7c,0xc6,0x3e,0x7e,0x8a,0x79,0xe5,0x66,0xe5,0xa7,0x2a,0x07,0x82,0x1d};
    static std::uint8_t sum72[32]    = {0x66,0x63,0x92,0x24,0xe1,0x3c,0x56,0x30,0x01,0x15,0xd5,0x81,0xd6,0x8e,0x41,0x2f,0xbe,0x97,0x02,0x6c,0x6a,0x9d,0x61,0x84,0xa0,0xe4,0xa3,0x1f,0xfb,0x5e,0x87,0xc7};
    sm2_fn_from_bytes(augend, augend72);
    sm2_fn_from_bytes(addend, addend72);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum72, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend73[32] = {0x91,0xb9,0x32,0x31,0x8d,0x8f,0x6f,0x56,0x5e,0xaa,0x67,0xa3,0xde,0xe1,0x81,0xe8,0xc8,0xe1,0xf8,0xe8,0xac,0x42,0xa3,0xe0,0x60,0xeb,0x5f,0xf8,0x13,0x0f,0x7f,0xdd};
    static std::uint8_t addend73[32] = {0xbe,0x23,0x7e,0x45,0xb6,0x65,0xb6,0xd5,0xb2,0x89,0x11,0x2f,0x2a,0x74,0xb9,0x3a,0x3e,0x77,0x0e,0x02,0x7a,0xda,0xaf,0x47,0x5e,0x3b,0xb2,0x1b,0xaf,0x48,0x1e,0xa5};
    static std::uint8_t sum73[32]    = {0x4f,0xdc,0xb0,0x78,0x43,0xf5,0x26,0x2c,0x11,0x33,0x78,0xd3,0x09,0x56,0x3b,0x23,0x95,0x55,0x27,0x80,0x05,0x57,0x4d,0xfc,0x6b,0x6b,0x1e,0x0a,0x88,0x82,0x5d,0x5f};
    sm2_fn_from_bytes(augend, augend73);
    sm2_fn_from_bytes(addend, addend73);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum73, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend74[32] = {0x8d,0x74,0x92,0x35,0x3f,0xb8,0xd9,0x34,0xf9,0x08,0x21,0x14,0x38,0x33,0x24,0x59,0x95,0xa3,0x2a,0xfa,0x44,0xe7,0xa8,0xda,0x1b,0x89,0xd6,0xdd,0x27,0x35,0xfa,0xed};
    static std::uint8_t addend74[32] = {0x45,0x9f,0x9d,0x5b,0xdf,0x3b,0x9f,0xb3,0xfb,0x7d,0x18,0x01,0x0b,0x69,0xf9,0x51,0x5c,0xce,0xfe,0x32,0xec,0x6e,0x6e,0x59,0xd6,0x8f,0x9d,0xa6,0x1a,0x83,0xff,0x66};
    static std::uint8_t sum74[32]    = {0xd3,0x14,0x2f,0x91,0x1e,0xf4,0x78,0xe8,0xf4,0x85,0x39,0x15,0x43,0x9d,0x1d,0xaa,0xf2,0x72,0x29,0x2d,0x31,0x56,0x17,0x33,0xf2,0x19,0x74,0x83,0x41,0xb9,0xfa,0x53};
    sm2_fn_from_bytes(augend, augend74);
    sm2_fn_from_bytes(addend, addend74);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum74, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend75[32] = {0x26,0x9a,0x41,0x58,0x15,0x63,0xe6,0x4c,0x0b,0xc5,0x58,0x35,0x2e,0x5a,0x38,0x9e,0x33,0xce,0x0d,0x40,0xa8,0xe6,0x79,0x48,0x2c,0x37,0x49,0x98,0x8f,0x1e,0x4c,0x49};
    static std::uint8_t addend75[32] = {0xd9,0xd0,0x30,0x2a,0xb3,0xe4,0xff,0x4a,0xcf,0xef,0x10,0x8f,0x50,0x90,0x13,0x51,0x31,0xf4,0x4f,0x6e,0x93,0x2f,0x1d,0x35,0x71,0xd5,0xfa,0x05,0x6f,0xd8,0xfa,0xe1};
    static std::uint8_t sum75[32]    = {0x00,0x6a,0x71,0x83,0xc9,0x48,0xe5,0x96,0xdb,0xb4,0x68,0xc4,0x7e,0xea,0x4b,0xef,0xf3,0xbe,0x7d,0x44,0x1a,0x4f,0x91,0x52,0x4a,0x51,0x4f,0x94,0xc5,0x22,0x06,0x07};
    sm2_fn_from_bytes(augend, augend75);
    sm2_fn_from_bytes(addend, addend75);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum75, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend76[32] = {0xbc,0x1d,0xcc,0x91,0x52,0x81,0x9c,0xc9,0x5d,0x1d,0x03,0x8e,0xf4,0xd0,0x02,0x6f,0xdf,0x90,0xc7,0xc5,0xac,0x96,0x05,0xab,0x4d,0xfc,0x23,0x89,0x4f,0xb3,0x3d,0xec};
    static std::uint8_t addend76[32] = {0xfa,0xe2,0xa5,0x7b,0x89,0xaf,0x7d,0xe2,0x42,0x26,0xa0,0x1e,0xb1,0xd3,0x95,0x7a,0xec,0x5e,0xb1,0xbc,0x8d,0xf8,0x35,0xf6,0xf1,0xaf,0xb3,0x29,0x2f,0x1f,0x0e,0x82};
    static std::uint8_t sum76[32]    = {0xb7,0x00,0x72,0x0d,0xdc,0x31,0x1a,0xab,0x9f,0x43,0xa3,0xad,0xa6,0xa3,0x97,0xeb,0x59,0xeb,0x9a,0x17,0x18,0xc8,0x36,0x76,0xeb,0xef,0xe2,0xa9,0x44,0xfd,0x0b,0x4b};
    sm2_fn_from_bytes(augend, augend76);
    sm2_fn_from_bytes(addend, addend76);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum76, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend77[32] = {0x89,0xff,0x81,0xf6,0x69,0xb8,0x70,0xf9,0xd8,0xb2,0xc7,0xec,0xe7,0x81,0x1d,0x98,0xaf,0x8d,0xa2,0x3f,0x41,0xeb,0xd6,0x25,0xdd,0xe5,0xc7,0xe9,0x80,0x59,0x16,0xee};
    static std::uint8_t addend77[32] = {0x51,0x6a,0xcd,0x18,0x44,0x8d,0x2b,0x4e,0xe7,0xdf,0xcf,0xdb,0x36,0x08,0xfb,0xaf,0x39,0xa7,0x54,0xa9,0x8a,0xc7,0x3b,0x6d,0x63,0xaf,0x89,0x8e,0x32,0x04,0x95,0x7e};
    static std::uint8_t sum77[32]    = {0xdb,0x6a,0x4f,0x0e,0xae,0x45,0x9c,0x48,0xc0,0x92,0x97,0xc8,0x1d,0x8a,0x19,0x47,0xe9,0x34,0xf6,0xe8,0xcc,0xb3,0x11,0x93,0x41,0x95,0x51,0x77,0xb2,0x5d,0xac,0x6c};
    sm2_fn_from_bytes(augend, augend77);
    sm2_fn_from_bytes(addend, addend77);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum77, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend78[32] = {0x4a,0x20,0x18,0x6e,0x5b,0x65,0x00,0xcc,0x52,0x3b,0x4b,0xf3,0x03,0x1a,0xf0,0xc5,0xe4,0x2f,0x83,0x12,0x6a,0x31,0xa6,0x81,0xfd,0xee,0x3e,0x46,0x3c,0xef,0x60,0x00};
    static std::uint8_t addend78[32] = {0x54,0xd1,0x37,0x7c,0x54,0x07,0xf3,0x1a,0xba,0xa8,0xc3,0x3a,0x26,0x8c,0x8e,0x56,0x22,0x98,0x87,0x46,0x60,0xb5,0x36,0xcb,0x03,0x92,0x9e,0x39,0x36,0x2e,0xda,0xa7};
    static std::uint8_t sum78[32]    = {0x9e,0xf1,0x4f,0xea,0xaf,0x6c,0xf3,0xe7,0x0c,0xe4,0x0f,0x2d,0x29,0xa7,0x7f,0x1c,0x06,0xc8,0x0a,0x58,0xca,0xe6,0xdd,0x4d,0x01,0x80,0xdc,0x7f,0x73,0x1e,0x3a,0xa7};
    sm2_fn_from_bytes(augend, augend78);
    sm2_fn_from_bytes(addend, addend78);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum78, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend79[32] = {0x38,0xb4,0x2e,0x1d,0x3a,0x98,0xb0,0x81,0x42,0x97,0xbd,0xaf,0x0d,0x18,0x91,0x0c,0xc3,0xeb,0x21,0x99,0x12,0x65,0xca,0xd3,0xc6,0x2e,0x82,0xb1,0xe4,0x8a,0x64,0x88};
    static std::uint8_t addend79[32] = {0xe1,0x4a,0x65,0x36,0x52,0xfd,0x7b,0x7e,0xb3,0xc2,0xa6,0xe5,0x4b,0xea,0x0a,0xde,0xb5,0x40,0x92,0xf5,0xc2,0xdb,0xb8,0xb3,0x3b,0x8b,0x19,0x9e,0xd9,0x02,0xa1,0xed};
    static std::uint8_t sum79[32]    = {0x19,0xfe,0x93,0x54,0x8d,0x96,0x2b,0xff,0xf6,0x5a,0x64,0x94,0x59,0x02,0x9b,0xec,0x07,0x27,0xd5,0x23,0xb3,0x7b,0x7e,0x5b,0xad,0xfd,0xa8,0x47,0x83,0xb7,0xc5,0x52};
    sm2_fn_from_bytes(augend, augend79);
    sm2_fn_from_bytes(addend, addend79);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum79, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend80[32] = {0x7a,0x1b,0xbf,0xa1,0x17,0xfb,0xf7,0xde,0x97,0x28,0x1a,0xdb,0xf9,0x89,0xa4,0xd7,0x73,0x13,0x7c,0x19,0xf7,0x6a,0x89,0x07,0x1e,0x40,0xf4,0xfc,0x87,0xb2,0x8f,0x01};
    static std::uint8_t addend80[32] = {0xf7,0x95,0x9e,0x73,0x89,0xb3,0x6c,0x22,0x91,0xa2,0x9b,0xbc,0xc2,0xba,0x21,0x03,0xe9,0x69,0xca,0x60,0x08,0x30,0x80,0xc6,0x7b,0x28,0x16,0x34,0xd2,0xd3,0xf6,0x3f};
    static std::uint8_t sum80[32]    = {0x71,0xb1,0x5e,0x15,0xa1,0xaf,0x64,0x01,0x28,0xca,0xb6,0x98,0xbc,0x43,0xc5,0xdb,0xea,0x79,0x67,0x0e,0xdd,0xd5,0x04,0xa2,0x45,0xad,0x17,0x28,0x20,0xb1,0x44,0x1d};
    sm2_fn_from_bytes(augend, augend80);
    sm2_fn_from_bytes(addend, addend80);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum80, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend81[32] = {0x6a,0x3e,0xb1,0xba,0x5b,0x3a,0x48,0x1a,0x65,0x02,0x68,0x36,0xaf,0xd4,0x81,0xce,0x40,0x65,0x86,0x84,0x1b,0x19,0x33,0x44,0xc2,0x7c,0x86,0x92,0xdb,0x64,0xbd,0xb2};
    static std::uint8_t addend81[32] = {0xec,0x5d,0x8e,0x93,0xd8,0xd2,0x42,0x8f,0xb0,0x9f,0xda,0xd2,0xef,0x97,0xc2,0xc2,0x7a,0xf3,0xb4,0x4e,0xdb,0xa1,0x79,0xb6,0x00,0x5d,0x91,0x43,0xb1,0x01,0x1b,0x54};
    static std::uint8_t sum81[32]    = {0x56,0x9c,0x40,0x4f,0x34,0x0c,0x8a,0xaa,0x15,0xa2,0x43,0x09,0x9f,0x6c,0x44,0x91,0x49,0x55,0x5b,0x67,0xd4,0xf4,0xa7,0xcf,0x6f,0x1e,0x23,0xcd,0x52,0x90,0x97,0xe3};
    sm2_fn_from_bytes(augend, augend81);
    sm2_fn_from_bytes(addend, addend81);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum81, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend82[32] = {0x64,0xea,0x03,0xca,0xfa,0xc5,0x6a,0x4b,0x0d,0x64,0x84,0x03,0xca,0x1b,0xe5,0xe5,0x29,0x83,0x83,0xe1,0x17,0x17,0x17,0x18,0x06,0x7f,0xaf,0x6f,0x64,0x2c,0x71,0x37};
    static std::uint8_t addend82[32] = {0x0e,0x1b,0xd1,0x0f,0xd1,0xae,0x17,0xcb,0xa0,0xa6,0xca,0x97,0x83,0xf9,0xae,0xde,0x24,0x95,0xef,0x92,0x75,0x29,0xca,0x6e,0x9a,0x54,0x51,0x1d,0x88,0xd2,0xcc,0x42};
    static std::uint8_t sum82[32]    = {0x73,0x05,0xd4,0xda,0xcc,0x73,0x82,0x16,0xae,0x0b,0x4e,0x9b,0x4e,0x15,0x94,0xc3,0x4e,0x19,0x73,0x73,0x8c,0x40,0xe1,0x86,0xa0,0xd4,0x00,0x8c,0xec,0xff,0x3d,0x79};
    sm2_fn_from_bytes(augend, augend82);
    sm2_fn_from_bytes(addend, addend82);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum82, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend83[32] = {0x92,0xbd,0xb8,0x93,0x34,0x1e,0x37,0xc4,0xf6,0xe0,0x4f,0xab,0x74,0x91,0x08,0x1b,0xd3,0x18,0xb3,0x77,0x9c,0x47,0xad,0xb0,0xd2,0x0d,0x1b,0xb2,0x4d,0xc0,0x15,0x73};
    static std::uint8_t addend83[32] = {0xdc,0x99,0x97,0x84,0x8e,0x4d,0xd6,0x95,0x2d,0x4e,0x0e,0x83,0x36,0xb5,0xf7,0xc4,0xbf,0x82,0xe7,0x54,0x2e,0xd0,0x86,0x9d,0xce,0x05,0x66,0x48,0x2c,0xd3,0xb0,0xe3};
    static std::uint8_t sum83[32]    = {0x6f,0x57,0x50,0x18,0xc2,0x6c,0x0e,0x5a,0x24,0x2e,0x5e,0x2e,0xab,0x46,0xff,0xe1,0x20,0x97,0xbb,0x60,0xa9,0x52,0x2f,0x23,0x4c,0x56,0x8d,0xf1,0x40,0xbe,0x85,0x33};
    sm2_fn_from_bytes(augend, augend83);
    sm2_fn_from_bytes(addend, addend83);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum83, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend84[32] = {0x27,0x1a,0x91,0x9a,0x69,0xb9,0x02,0xa1,0xab,0x51,0x00,0x89,0x12,0x7f,0x6d,0x35,0x6d,0xd3,0xf6,0xf7,0xba,0xd9,0x01,0x8f,0xa5,0xc6,0xb1,0xe3,0xb9,0x79,0x54,0x06};
    static std::uint8_t addend84[32] = {0x85,0x45,0xf5,0x3d,0xc3,0xfa,0xcb,0xbb,0x53,0xe8,0x36,0xe6,0x45,0xe3,0x18,0xd9,0x24,0xed,0x94,0x68,0x84,0x8a,0x39,0xc9,0x21,0xf8,0x19,0xfc,0x48,0x78,0x10,0x6d};
    static std::uint8_t sum84[32]    = {0xac,0x60,0x86,0xd8,0x2d,0xb3,0xce,0x5c,0xff,0x39,0x37,0x6f,0x58,0x62,0x86,0x0e,0x92,0xc1,0x8b,0x60,0x3f,0x63,0x3b,0x58,0xc7,0xbe,0xcb,0xe0,0x01,0xf1,0x64,0x73};
    sm2_fn_from_bytes(augend, augend84);
    sm2_fn_from_bytes(addend, addend84);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum84, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend85[32] = {0x95,0xbe,0xe4,0xeb,0x91,0x0b,0x96,0x5f,0x6c,0x16,0x4f,0x67,0xf7,0x6e,0x46,0x5a,0xa5,0x23,0x7c,0x6e,0xfa,0xa1,0xcb,0x2f,0x84,0xd6,0xa1,0x2f,0xd9,0xbf,0xbb,0xcd};
    static std::uint8_t addend85[32] = {0x43,0x1a,0x14,0x46,0x9d,0xcb,0x80,0x86,0xc1,0x1b,0x51,0x97,0x6b,0xd4,0x46,0x6b,0xfd,0x8a,0xaa,0x3f,0x86,0xcf,0x89,0xda,0xea,0x95,0x68,0x0e,0x0a,0x8c,0x97,0x5c};
    static std::uint8_t sum85[32]    = {0xd8,0xd8,0xf9,0x32,0x2e,0xd7,0x16,0xe6,0x2d,0x31,0xa0,0xff,0x63,0x42,0x8c,0xc6,0xa2,0xae,0x26,0xae,0x81,0x71,0x55,0x0a,0x6f,0x6c,0x09,0x3d,0xe4,0x4c,0x53,0x29};
    sm2_fn_from_bytes(augend, augend85);
    sm2_fn_from_bytes(addend, addend85);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum85, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend86[32] = {0x4c,0xe3,0x8b,0xb4,0x9e,0x11,0x10,0x57,0x34,0xee,0xf7,0xfc,0x55,0x4c,0x2d,0x33,0x9f,0x7b,0x8f,0x33,0xd4,0x7d,0x35,0x1a,0xf4,0xd2,0xfa,0xec,0x6f,0xe1,0x0e,0x50};
    static std::uint8_t addend86[32] = {0x02,0xef,0x1e,0x8c,0x8e,0x77,0x8b,0xa5,0xe4,0xb7,0xa6,0x46,0x49,0x93,0x1c,0x12,0xe6,0xdb,0xdb,0x0f,0xf0,0xef,0x0a,0xb6,0x45,0x79,0x10,0x53,0x3d,0xf4,0x71,0x1f};
    static std::uint8_t sum86[32]    = {0x4f,0xd2,0xaa,0x41,0x2c,0x88,0x9b,0xfd,0x19,0xa6,0x9e,0x42,0x9e,0xdf,0x49,0x46,0x86,0x57,0x6a,0x43,0xc5,0x6c,0x3f,0xd1,0x3a,0x4c,0x0b,0x3f,0xad,0xd5,0x7f,0x6f};
    sm2_fn_from_bytes(augend, augend86);
    sm2_fn_from_bytes(addend, addend86);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum86, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend87[32] = {0x67,0x17,0xde,0xd5,0x76,0xae,0x79,0x8b,0xf0,0x70,0x40,0xe1,0xc1,0x58,0xfd,0xbf,0xbb,0x15,0x78,0x88,0x4a,0xcd,0x55,0xb3,0xfc,0x14,0xf2,0x7b,0x61,0xb1,0xfe,0x3b};
    static std::uint8_t addend87[32] = {0xb1,0x9d,0x54,0x31,0x8d,0xd6,0x69,0xe0,0x4c,0xb5,0xe4,0x21,0x11,0x71,0x19,0x84,0x37,0xa4,0x66,0x9f,0x05,0xf5,0xc5,0x21,0xb4,0x82,0xc0,0x58,0x28,0xe9,0xac,0x58};
    static std::uint8_t sum87[32]    = {0x18,0xb5,0x33,0x08,0x04,0x84,0xe3,0x6c,0x3d,0x26,0x25,0x02,0xd2,0xca,0x17,0x44,0x80,0xb5,0xff,0xbc,0x2e,0xfd,0x15,0xaa,0x5c,0xdb,0xbe,0xca,0x50,0xc6,0x69,0x70};
    sm2_fn_from_bytes(augend, augend87);
    sm2_fn_from_bytes(addend, addend87);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum87, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend88[32] = {0xf7,0x64,0x9e,0x0c,0xa1,0x79,0xbd,0x25,0xd2,0x94,0x1a,0xfd,0xa5,0x8a,0xd5,0xcd,0xf0,0x33,0x0b,0xfb,0xc7,0x4f,0x0f,0x12,0x5c,0xf4,0x35,0x8c,0xe2,0xd7,0xfc,0x85};
    static std::uint8_t addend88[32] = {0xc7,0x37,0x67,0x7e,0x50,0x00,0x10,0x76,0x0b,0xbb,0x6c,0x49,0x88,0xcb,0x8c,0xe7,0x3f,0x14,0xb4,0x9a,0x46,0x6c,0x27,0x65,0x4f,0xd0,0x17,0xa0,0xae,0xc9,0x28,0x52};
    static std::uint8_t sum88[32]    = {0xbe,0x9c,0x05,0x8b,0xf1,0x79,0xcd,0x9b,0xde,0x4f,0x87,0x47,0x2e,0x56,0x62,0xb5,0xbd,0x43,0xe1,0x2a,0xeb,0xf5,0x31,0x4c,0x59,0x08,0x59,0x24,0x57,0xcb,0xe3,0xb4};
    sm2_fn_from_bytes(augend, augend88);
    sm2_fn_from_bytes(addend, addend88);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum88, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend89[32] = {0xa4,0x11,0x40,0x9f,0x93,0x60,0x47,0x8a,0x83,0x9c,0x4e,0x4b,0xf2,0x3c,0xf3,0xc0,0xed,0x21,0x84,0xcc,0xb4,0xdf,0x44,0x01,0xba,0x8f,0x5c,0xd4,0x8b,0x76,0x06,0xbd};
    static std::uint8_t addend89[32] = {0xfc,0x22,0xef,0x11,0x1f,0x0d,0x05,0x83,0x23,0xc6,0x26,0x95,0x7a,0xf7,0xad,0x31,0xca,0x84,0xb5,0xf0,0xfa,0xe4,0xfe,0x22,0xb5,0x80,0x57,0xbc,0xfe,0x9c,0x09,0xef};
    static std::uint8_t sum89[32]    = {0xa0,0x34,0x2f,0xb1,0xb2,0x6d,0x4d,0x0d,0xa7,0x62,0x74,0xe1,0x6d,0x34,0xa0,0xf3,0x45,0xa2,0x5b,0x52,0x8d,0xfe,0x3c,0xf9,0x1c,0x53,0xc0,0x88,0x50,0x3c,0xcf,0x89};
    sm2_fn_from_bytes(augend, augend89);
    sm2_fn_from_bytes(addend, addend89);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum89, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend90[32] = {0xd7,0xd6,0xa8,0x36,0xae,0xdb,0x55,0x3d,0xef,0x9b,0xd3,0x63,0x8b,0xc7,0xb5,0x31,0x14,0x1f,0x77,0x96,0x73,0x98,0x5b,0x09,0x87,0xa0,0x89,0x78,0xb3,0xc8,0xb1,0xe5};
    static std::uint8_t addend90[32] = {0xc2,0xb7,0xe4,0xf7,0x37,0x22,0xe0,0xe7,0x6b,0x73,0x93,0x1a,0xcf,0x4a,0x38,0xe9,0xea,0xb0,0x1b,0x7c,0x76,0x2f,0x65,0x87,0x3f,0xb6,0xb3,0x65,0xae,0x59,0xa0,0x1b};
    static std::uint8_t sum90[32]    = {0x9a,0x8e,0x8d,0x2e,0xe5,0xfe,0x36,0x25,0x5b,0x0f,0x66,0x7e,0x5b,0x11,0xee,0x1b,0x8c,0xcb,0xb3,0xa7,0xc8,0x01,0xbb,0x65,0x73,0x9b,0x48,0xd5,0x28,0x4d,0x10,0xdd};
    sm2_fn_from_bytes(augend, augend90);
    sm2_fn_from_bytes(addend, addend90);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum90, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend91[32] = {0x50,0xbb,0xd4,0xbb,0x37,0xd7,0x05,0xa6,0x62,0x1c,0xbc,0xd7,0xae,0xa9,0x9a,0x78,0xc5,0xe6,0x98,0xfe,0xcb,0x54,0xd5,0x98,0xc9,0x0f,0xf2,0x2e,0xd8,0x67,0xa7,0x8e};
    static std::uint8_t addend91[32] = {0xf4,0x79,0xd6,0x3d,0xf1,0xca,0x43,0xc7,0x40,0x84,0xea,0xe4,0x59,0x97,0xda,0xa9,0x50,0x0e,0x95,0xf3,0x05,0x37,0x48,0xe2,0xe5,0xc9,0xd7,0xf9,0xbc,0x86,0xf0,0x16};
    static std::uint8_t sum91[32]    = {0x45,0x35,0xaa,0xfa,0x29,0xa1,0x49,0x6d,0xa2,0xa1,0xa7,0xbc,0x08,0x41,0x75,0x22,0xa3,0xf1,0x4f,0x86,0xae,0xc6,0x19,0x50,0x5b,0x1d,0xd6,0x1f,0x5b,0x19,0x56,0x81};
    sm2_fn_from_bytes(augend, augend91);
    sm2_fn_from_bytes(addend, addend91);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum91, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend92[32] = {0xa3,0xec,0x0a,0x92,0x67,0x11,0xeb,0x2b,0x9a,0x66,0xc7,0x7b,0x36,0x03,0xe9,0x6e,0x57,0x93,0xc6,0x3c,0x73,0x10,0x8f,0x95,0xa4,0x2a,0x88,0x87,0x3c,0xb2,0x2d,0x66};
    static std::uint8_t addend92[32] = {0xdb,0xa2,0xd9,0xf9,0x84,0x28,0x32,0xca,0xa1,0x04,0xb1,0x33,0xa5,0xa2,0x9c,0xb2,0x2b,0x6d,0xc8,0x38,0x40,0xbf,0x3f,0x1a,0xd4,0x61,0x4a,0x8b,0x62,0xf1,0x61,0x15};
    static std::uint8_t sum92[32]    = {0x7f,0x8e,0xe4,0x8c,0xeb,0x3a,0x1d,0xf6,0x3b,0x6b,0x78,0xae,0xdb,0xa6,0x86,0x21,0x10,0xfd,0xaf,0x09,0x92,0x09,0xc9,0x85,0x24,0xcf,0xdf,0x09,0x65,0xce,0x4d,0x58};
    sm2_fn_from_bytes(augend, augend92);
    sm2_fn_from_bytes(addend, addend92);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum92, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend93[32] = {0x12,0xf6,0xea,0x2d,0x90,0x67,0xe0,0x62,0x9a,0xbf,0xaa,0xfd,0x4c,0xea,0xff,0x40,0x4b,0xe0,0x88,0x3b,0xf4,0xfb,0xad,0xd8,0x8d,0xbb,0x44,0xe4,0x78,0x5b,0xa1,0xdc};
    static std::uint8_t addend93[32] = {0x85,0x42,0xfa,0x50,0xec,0xe0,0xe0,0xd3,0xd8,0x0c,0x80,0x6c,0x78,0x10,0x6f,0xb2,0x62,0xe0,0x88,0x34,0x33,0x15,0x30,0xf7,0x5b,0x1c,0x57,0x97,0x88,0x89,0x07,0xb3};
    static std::uint8_t sum93[32]    = {0x98,0x39,0xe4,0x7e,0x7d,0x48,0xc1,0x36,0x72,0xcc,0x2b,0x69,0xc4,0xfb,0x6e,0xf2,0xae,0xc1,0x10,0x70,0x28,0x10,0xde,0xcf,0xe8,0xd7,0x9c,0x7c,0x00,0xe4,0xa9,0x8f};
    sm2_fn_from_bytes(augend, augend93);
    sm2_fn_from_bytes(addend, addend93);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum93, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend94[32] = {0x7c,0xd8,0xd8,0x08,0xd6,0x3a,0xd4,0x15,0x83,0xd8,0x74,0x22,0x67,0xbf,0x1e,0xee,0x4f,0x61,0xb4,0x31,0xe0,0x0e,0x20,0x9f,0x11,0x02,0xe5,0x4c,0x59,0xbb,0x02,0x17};
    static std::uint8_t addend94[32] = {0x67,0x92,0xd4,0xac,0x34,0x2e,0x6c,0x82,0xdd,0xab,0x3e,0xa4,0x74,0x73,0x7c,0x95,0x5e,0xb8,0xdd,0x6d,0x83,0xfa,0xa8,0x84,0xb1,0x42,0x14,0x98,0xe8,0x42,0x8d,0x3a};
    static std::uint8_t sum94[32]    = {0xe4,0x6b,0xac,0xb5,0x0a,0x69,0x40,0x98,0x61,0x83,0xb2,0xc6,0xdc,0x32,0x9b,0x83,0xae,0x1a,0x91,0x9f,0x64,0x08,0xc9,0x23,0xc2,0x44,0xf9,0xe5,0x41,0xfd,0x8f,0x51};
    sm2_fn_from_bytes(augend, augend94);
    sm2_fn_from_bytes(addend, addend94);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum94, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend95[32] = {0xc0,0x02,0x5b,0xb4,0xb6,0xcd,0x53,0x15,0x1b,0xe1,0x5f,0x48,0xf3,0x4c,0x07,0x22,0x35,0x22,0xb3,0xca,0xec,0x0a,0xc3,0x8c,0x8f,0xe4,0xb5,0xa8,0xfe,0xbe,0x7e,0x55};
    static std::uint8_t addend95[32] = {0x78,0x66,0x4a,0x4f,0xf0,0xd7,0x54,0x9d,0xa4,0x0f,0x99,0x12,0x00,0xb8,0x54,0xb5,0xa4,0xeb,0xda,0x31,0x95,0xbe,0x78,0xaf,0xb6,0xe1,0x3f,0xab,0xb3,0x49,0x44,0xf4};
    static std::uint8_t sum95[32]    = {0x38,0x68,0xa6,0x05,0xa7,0xa4,0xa7,0xb2,0xbf,0xf0,0xf8,0x5a,0xf4,0x04,0x5b,0xd8,0x68,0x0a,0xae,0x91,0x60,0x03,0x37,0x10,0xf3,0x0a,0x01,0x4b,0x78,0x32,0x82,0x26};
    sm2_fn_from_bytes(augend, augend95);
    sm2_fn_from_bytes(addend, addend95);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum95, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend96[32] = {0x43,0xd5,0xd5,0x20,0xea,0xaa,0xa1,0x03,0x0f,0x06,0x4d,0xb9,0x4f,0xd3,0x20,0x12,0x8e,0xf4,0x6f,0xbb,0x37,0x58,0x0f,0xce,0x80,0x6b,0x2e,0xf5,0x9e,0x66,0xa9,0x49};
    static std::uint8_t addend96[32] = {0x76,0xb2,0xa4,0x25,0x56,0x7b,0x80,0xf7,0x0f,0x2b,0x72,0x4b,0x01,0x7f,0xbe,0x55,0xee,0x3a,0xc0,0x18,0xec,0x29,0xa2,0x68,0x4c,0x31,0x9b,0xd3,0x78,0x1d,0xae,0xa8};
    static std::uint8_t sum96[32]    = {0xba,0x88,0x79,0x46,0x41,0x26,0x21,0xfa,0x1e,0x31,0xc0,0x04,0x51,0x52,0xde,0x68,0x7d,0x2f,0x2f,0xd4,0x23,0x81,0xb2,0x36,0xcc,0x9c,0xca,0xc9,0x16,0x84,0x57,0xf1};
    sm2_fn_from_bytes(augend, augend96);
    sm2_fn_from_bytes(addend, addend96);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum96, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend97[32] = {0xb7,0x9c,0x50,0xe1,0x29,0xc2,0x08,0x14,0x00,0x52,0xbd,0x22,0x0f,0xeb,0xda,0x0f,0x06,0x2a,0x29,0x21,0x64,0x27,0xe6,0x3d,0x59,0xd3,0xaa,0x76,0xfc,0xd8,0x4b,0x4d};
    static std::uint8_t addend97[32] = {0xe3,0x52,0x17,0xc8,0x74,0xe3,0x0f,0x6a,0xb5,0x55,0x2f,0x92,0x26,0xa1,0x8b,0x53,0x81,0x84,0x34,0x92,0xb6,0x76,0xa2,0x9b,0x77,0x23,0x08,0x96,0x1a,0x74,0xaa,0x2f};
    static std::uint8_t sum97[32]    = {0x9a,0xee,0x68,0xaa,0x9e,0xa5,0x17,0x7e,0xb5,0xa7,0xec,0xb4,0x36,0x8d,0x65,0x63,0x15,0xaa,0x7e,0x48,0xf8,0xd8,0x83,0xad,0x7d,0x3a,0xbf,0x03,0xdd,0x77,0xb4,0x59};
    sm2_fn_from_bytes(augend, augend97);
    sm2_fn_from_bytes(addend, addend97);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum97, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend98[32] = {0xd1,0x6f,0xa2,0x5d,0xbf,0x47,0xbf,0x43,0xf0,0x1c,0x77,0xc8,0x0c,0xf1,0xc0,0x1d,0x04,0x1c,0xde,0x80,0x9f,0xab,0x17,0x80,0x79,0x1f,0x12,0x99,0x39,0x2d,0x82,0xfa};
    static std::uint8_t addend98[32] = {0xba,0x1b,0x64,0x1c,0x8c,0x7b,0x95,0xfb,0x46,0x67,0x7a,0xe0,0x74,0xf5,0x50,0xc2,0xde,0xf5,0xcb,0xc5,0xc5,0x51,0x0b,0x10,0x0e,0x63,0x6f,0x65,0x18,0x82,0x38,0xbe};
    static std::uint8_t sum98[32]    = {0x8b,0x8b,0x06,0x7b,0x4b,0xc3,0x55,0x3f,0x36,0x83,0xf2,0xa8,0x81,0xe7,0x10,0xe0,0x71,0x0e,0xca,0xdb,0x43,0x36,0x1d,0x65,0x33,0xc6,0x8d,0xf5,0x17,0xda,0x7a,0x95};
    sm2_fn_from_bytes(augend, augend98);
    sm2_fn_from_bytes(addend, addend98);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum98, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }

    static std::uint8_t augend99[32] = {0x7b,0xd5,0xb4,0xd3,0xc1,0x31,0x8e,0x20,0x77,0x1a,0x6f,0xf5,0x86,0xb6,0xbe,0xb5,0x51,0x8a,0x01,0xc7,0x9f,0xf3,0x0d,0xce,0x70,0x77,0x73,0x61,0xdd,0x64,0xe0,0xf9};
    static std::uint8_t addend99[32] = {0xd5,0xc0,0xfd,0x75,0x32,0xbd,0xbc,0xdf,0x75,0xfb,0xf6,0xc7,0x1a,0x70,0x92,0xd3,0x25,0xd0,0xbc,0x0d,0x8e,0x38,0x23,0xeb,0xd8,0x29,0xcc,0x22,0xce,0x8e,0x3e,0xaf};
    static std::uint8_t sum99[32]    = {0x51,0x96,0xb2,0x49,0xf3,0xef,0x4a,0xff,0xed,0x16,0x66,0xbc,0xa1,0x27,0x51,0x89,0x05,0x56,0xde,0x6a,0x0c,0x65,0x2c,0x8e,0xf4,0xe5,0x4b,0x7b,0x72,0x1d,0xde,0x85};
    sm2_fn_from_bytes(augend, augend99);
    sm2_fn_from_bytes(addend, addend99);
    sm2_fn_add(sum, augend, addend);
    sm2_fn_to_bytes(sum_data, sum);
    if (std::memcmp(sum99, sum_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fn_add");
    }
}